Major refactoring cleanup: - Add new controller architecture (class-controller-*.php) - Add new settings-v2 UI (views/settings-v2/) - Add new CSS architecture (agentic-sidebar.css, tokens) - Add esbuild build pipeline (scripts/build.js, package.json) - Add composer dependencies (vendor/) - Add frontend src directory (assets/js/src/index.jsx) - Add documentation files - Remove old/obsolete files (class-settings.php, old CSS) This commits all pending changes from previous refactoring efforts.
86 lines
1.9 KiB
PHP
86 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* This file is part of phpDocumentor.
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*
|
|
* @link http://phpdoc.org
|
|
*/
|
|
|
|
namespace Flyfinder\Specification;
|
|
|
|
use Mockery as m;
|
|
use PHPUnit\Framework\MockObject\MockObject;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Test case for CompositeSpecification
|
|
*
|
|
* @coversDefaultClass Flyfinder\Specification\CompositeSpecification
|
|
*/
|
|
class CompositeSpecificationTest extends TestCase
|
|
{
|
|
/** @var m\MockInterface|HasExtension */
|
|
private $hasExtension;
|
|
|
|
/** @var CompositeSpecification|MockObject */
|
|
private $fixture;
|
|
|
|
/**
|
|
* Initializes the fixture for this test.
|
|
*/
|
|
public function setUp() : void
|
|
{
|
|
$this->hasExtension = m::mock(HasExtension::class);
|
|
$this->fixture = $this->getMockForAbstractClass(CompositeSpecification::class);
|
|
}
|
|
|
|
public function tearDown() : void
|
|
{
|
|
m::close();
|
|
}
|
|
|
|
/**
|
|
* @uses \Flyfinder\Specification\AndSpecification
|
|
*
|
|
* @covers ::andSpecification
|
|
*/
|
|
public function testAndSpecification() : void
|
|
{
|
|
$this->assertInstanceOf(
|
|
AndSpecification::class,
|
|
$this->fixture->andSpecification($this->hasExtension)
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @uses \Flyfinder\Specification\OrSpecification
|
|
*
|
|
* @covers ::orSpecification
|
|
*/
|
|
public function testOrSpecification() : void
|
|
{
|
|
$this->assertInstanceOf(
|
|
OrSpecification::class,
|
|
$this->fixture->orSpecification($this->hasExtension)
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @uses \Flyfinder\Specification\NotSpecification
|
|
*
|
|
* @covers ::notSpecification
|
|
*/
|
|
public function testNotSpecification() : void
|
|
{
|
|
$this->assertInstanceOf(
|
|
NotSpecification::class,
|
|
$this->fixture->notSpecification()
|
|
);
|
|
}
|
|
}
|