eZ\Publish\Core\Persistence\Legacy\Tests\Content\Location\Gateway\DoctrineDatabaseTest::testSwapLocations PHP Method

testSwapLocations() public method

public testSwapLocations ( )
    public function testSwapLocations()
    {
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php');
        $handler = $this->getLocationGateway();
        $handler->swap(70, 78);
        $query = $this->handler->createSelectQuery();
        $this->assertQueryResult(array(array(70, 76), array(78, 68)), $query->select('node_id', 'contentobject_id')->from('ezcontentobject_tree')->where($query->expr->in('node_id', array(70, 78)))->orderBy('node_id'));
    }