izzum\statemachine\loader\YAMLTest::shouldThrowExceptionForNoReadPermissions PHP Метод

shouldThrowExceptionForNoReadPermissions() публичный Метод

    public function shouldThrowExceptionForNoReadPermissions()
    {
        $machine = new StateMachine(new Context(new Identifier('yaml-test', 'yaml-machine')));
        try {
            $loader = YAML::createFromFile(__DIR__ . '/fixture-no-permission.yaml');
            $this->fail('should not come here');
        } catch (Exception $e) {
            $this->assertEquals(Exception::BAD_LOADERDATA, $e->getCode());
            $this->assertContains('Failed to read', $e->getMessage());
        }
    }