Cascade\Tests\Fixtures::getSampleJsonFile PHP Method

getSampleJsonFile() public static method

Return the fixture sample JSON file
public static getSampleJsonFile ( ) : string
return string Path to a sample JSON file
    public static function getSampleJsonFile()
    {
        return self::fixtureDir() . '/fixture_sample.json';
    }

Usage Example

Example #1
0
 /**
  * Test loading a JSON file
  * Note that this function tests isJson with a valid Json string
  */
 public function testSupportsWithJsonFile()
 {
     $this->jsonLoader->expects($this->once())->method('isFile')->willReturn(true);
     $this->jsonLoader->expects($this->once())->method('validateExtension')->willReturn(true);
     $jsonFile = Fixtures::getSampleJsonFile();
     $this->assertTrue($this->jsonLoader->supports($jsonFile));
 }