for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare( strict_types = 1 );
namespace Coco\SourceWatcher\Tests\Core\Extractors;
use Coco\SourceWatcher\Core\Extractors\JsonExtractor;
use PHPUnit\Framework\TestCase;
class JsonExtractorTest extends TestCase
{
public function testSetterGetterAttributeInput () : void
$jsonExtractor = new JsonExtractor();
$givenInput = "/some/file/path/file.json";
$expectedInput = "/some/file/path/file.json";
$jsonExtractor->setInput( $givenInput );
$this->assertEquals( $expectedInput, $jsonExtractor->getInput() );
}
public function testSetGetColumns () : void
$givenColumns = array( "color" => "colors.*.color" );
$expectedColumns = array( "color" => "colors.*.color" );
$jsonExtractor->setColumns( $givenColumns );
$this->assertEquals( $expectedColumns, $jsonExtractor->getColumns() );