ImboIntegrationTest\EventListener\ImageVariations\Storage\DoctrineTest::setUp PHP Method

setUp() public method

Make sure we have the PDO and pdo_sqlite extension loaded, and Doctrine is installed
public setUp ( )
    public function setUp()
    {
        if (!extension_loaded('PDO')) {
            $this->markTestSkipped('PDO is required to run this test');
        }
        if (!extension_loaded('pdo_sqlite')) {
            $this->markTestSkipped('pdo_sqlite is required to run this test');
        }
        if (!class_exists('Doctrine\\DBAL\\DriverManager')) {
            $this->markTestSkipped('Doctrine is required to run this test');
        }
        // Create tmp tables
        $this->pdo = new PDO('sqlite::memory:');
        $this->pdo->query('
            CREATE TABLE storage_image_variations (
                user TEXT NOT NULL,
                imageIdentifier TEXT NOT NULL,
                width INTEGER NOT NULL,
                data BLOB NOT NULL,
                PRIMARY KEY (user,imageIdentifier,width)
            )
        ');
        parent::setUp();
    }