1
0
mirror of https://github.com/halaxa/json-machine.git synced 2025-03-15 08:59:39 +01:00

set pointer of the failing test to the exact place where it fails.

This commit is contained in:
Bas de Groot 2019-12-02 10:54:46 +01:00
parent 6d45dfabd9
commit 5e95d9fbce

View File

@ -21,10 +21,7 @@ class JsonPointerTest extends \PHPUnit_Framework_TestCase
{
$jsonPointer = '/datafeed/programs/0';
echo getcwd();
$products = JsonMachine::fromFile(getcwd().'/test/JsonMachineTest/JsonPointerTest.json', $jsonPointer);
$this->assertCount(2, $products);
foreach ($products as $product) {
$this->assertEquals('Title', $product->product_info->title);
}
$firstProgram = JsonMachine::fromFile(getcwd().'/test/JsonMachineTest/JsonPointerTest.json', $jsonPointer);
$this->assertCount(2, $firstProgram);
}
}