for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* 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.
* @copyright 2010-2015 Mike van Riel<[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace Flyfinder\Specification;
use PHPUnit\Framework\TestCase;
use Mockery as m;
* Test case for HasExtension
* @coversDefaultClass Flyfinder\Specification\HasExtension
class HasExtensionTest extends TestCase
{
/** @var HasExtension */
private $fixture;
* Initializes the fixture for this test.
public function setUp()
$this->fixture = new HasExtension(['txt']);
}
public function tearDown()
m::close();
* @covers ::__construct
* @covers ::isSatisfiedBy
public function testIfSpecificationIsSatisfied()
$this->assertTrue($this->fixture->isSatisfiedBy(['extension' => 'txt']));
public function testIfSpecificationIsNotSatisfied()
$this->assertFalse($this->fixture->isSatisfiedBy(['extension' => 'php']));