Ejemplo n.º 1
0
 /**
  * Test loading a Yaml file
  */
 public function testSupportsWithYamlFile()
 {
     $this->yamlLoader->expects($this->once())->method('isFile')->willReturn(true);
     $this->yamlLoader->expects($this->once())->method('validateExtension')->willReturn(true);
     $yamlFile = Fixtures::getSampleYamlFile();
     $this->assertTrue($this->yamlLoader->supports($yamlFile));
 }
Ejemplo n.º 2
0
 /**
  * Test isJson method with invalid JSON string.
  * Valid scenario is tested by the method above
  */
 public function testSupportsWithNonJsonString()
 {
     $this->jsonLoader->expects($this->once())->method('isFile')->willReturn(false);
     $someString = Fixtures::getSampleString();
     $this->assertFalse($this->jsonLoader->supports($someString));
 }