Skip to content

Commit 5eea366

Browse files
committed
Добавлен mock site_url в тест AssetMinification для корректной работы urlToPath
1 parent ee7a16b commit 5eea366

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/Unit/AssetMinificationTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?php
22

33
describe('AssetMinification', function () {
4+
beforeAll(function() {
5+
if (!function_exists('site_url')) {
6+
function site_url() {
7+
return 'http://localhost';
8+
}
9+
}
10+
});
11+
412
it('creates cache files for CSS assets', function () {
513
$optionService = \Mockery::mock('\\WpAddon\\Services\\OptionService');
614
$assetMinification = new \AssetMinification($optionService);

0 commit comments

Comments
 (0)