Skip to content

Commit

Permalink
Added Object Manager tests for Virtual Objects
Browse files Browse the repository at this point in the history
  • Loading branch information
cundd committed Aug 13, 2015
1 parent 10c21cd commit dfadfed
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Tests/Functional/Core/ObjectManagerTest.php
Expand Up @@ -251,4 +251,42 @@ public function getDefaultHandlerForPathWithFormatTest() {
$this->assertInstanceOf('\\Cundd\\Rest\\Handler', $handler);
}



/**
* @test
*/
public function getDataProviderForVirtualObjectTest() {
$_GET['u'] = 'VirtualObject-Page';
$dataProvider = $this->fixture->getDataProvider();
$this->assertInstanceOf('Cundd\Rest\DataProvider\VirtualObjectDataProvider', $dataProvider);
}

/**
* @test
*/
public function getDataProviderForVirtualObjectWithFormatTest() {
$_GET['u'] = 'VirtualObject-Page.json';
$dataProvider = $this->fixture->getDataProvider();
$this->assertInstanceOf('Cundd\Rest\DataProvider\VirtualObjectDataProvider', $dataProvider);
}

/**
* @test
*/
public function getDataProviderForVirtualObjectWithPathTest() {
$_GET['u'] = 'VirtualObject-Page/1';
$dataProvider = $this->fixture->getDataProvider();
$this->assertInstanceOf('Cundd\Rest\DataProvider\VirtualObjectDataProvider', $dataProvider);
}

/**
* @test
*/
public function getDataProviderForVirtualObjectWithPathWithFormatTest() {
$_GET['u'] = 'VirtualObject-Page/1.json';
$dataProvider = $this->fixture->getDataProvider();
$this->assertInstanceOf('Cundd\Rest\DataProvider\VirtualObjectDataProvider', $dataProvider);
}

}

0 comments on commit dfadfed

Please sign in to comment.