Neos\Flow\Tests\Unit\Package\PackageFactoryTest::createThrowsExceptionIfCustomPackageDoesNotImplementPackageInterface PHP Method

createThrowsExceptionIfCustomPackageDoesNotImplementPackageInterface() public method

    public function createThrowsExceptionIfCustomPackageDoesNotImplementPackageInterface()
    {
        $packagePath = 'vfs://Packages/Some/Path/Some.Package/';
        $packageFilePath = $packagePath . 'Classes/Some/Package/Package.php';
        mkdir(dirname($packageFilePath), 0777, true);
        file_put_contents($packagePath . 'composer.json', '{"name": "some/package", "type": "neos-test", "autoload": { "psr-0": { "Foo": "bar" }}}');
        file_put_contents($packageFilePath, '<?php namespace Neos\\Flow\\Fixtures { class CustomPackage1 {}}');
        require $packageFilePath;
        $this->packageFactory->create('vfs://Packages/', 'Some/Path/Some.Package/', 'Some.Package', 'some/package');
    }