refactor: Cleanup git state - commit all staged changes
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.
This commit is contained in:
73
vendor/phpdocumentor/flyfinder/tests/unit/Specification/AndSpecificationTest.php
vendored
Normal file
73
vendor/phpdocumentor/flyfinder/tests/unit/Specification/AndSpecificationTest.php
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
<?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\TestCase;
|
||||
|
||||
/**
|
||||
* Test case for AndSpecification
|
||||
*
|
||||
* @coversDefaultClass \Flyfinder\Specification\AndSpecification
|
||||
*/
|
||||
class AndSpecificationTest extends TestCase
|
||||
{
|
||||
/** @var m\MockInterface|HasExtension */
|
||||
private $hasExtension;
|
||||
|
||||
/** @var m\MockInterface|IsHidden */
|
||||
private $isHidden;
|
||||
|
||||
/** @var AndSpecification */
|
||||
private $fixture;
|
||||
|
||||
/**
|
||||
* Initializes the fixture for this test.
|
||||
*/
|
||||
public function setUp() : void
|
||||
{
|
||||
$this->hasExtension = m::mock(HasExtension::class);
|
||||
$this->isHidden = m::mock(IsHidden::class);
|
||||
$this->fixture = new AndSpecification($this->hasExtension, $this->isHidden);
|
||||
}
|
||||
|
||||
public function tearDown() : void
|
||||
{
|
||||
m::close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::__construct
|
||||
* @covers ::isSatisfiedBy
|
||||
*/
|
||||
public function testIfSpecificationIsSatisfied() : void
|
||||
{
|
||||
$this->hasExtension->shouldReceive('isSatisfiedBy')->once()->andReturn(true);
|
||||
$this->isHidden->shouldReceive('isSatisfiedBy')->once()->andReturn(true);
|
||||
|
||||
$this->assertTrue($this->fixture->isSatisfiedBy(['test']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::__construct
|
||||
* @covers ::isSatisfiedBy
|
||||
*/
|
||||
public function testIfSpecificationIsNotSatisfied() : void
|
||||
{
|
||||
$this->hasExtension->shouldReceive('isSatisfiedBy')->once()->andReturn(true);
|
||||
$this->isHidden->shouldReceive('isSatisfiedBy')->once()->andReturn(false);
|
||||
|
||||
$this->assertFalse($this->fixture->isSatisfiedBy(['test']));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user