/** * 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)); }
/** * 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)); }