Skip to content

Commit

Permalink
Fixed more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Apr 7, 2019
1 parent b0ffd3e commit 390bb64
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function testDebugBarContent()

// Check extra info content
$this->assertContains('sf-toolbar-status-default', $block->attr('class'), 'The toolbar block should have the default color.');
$this->assertSame('test_mongodb' === $this->env ? DocumentDummy::class : Dummy::class, $block->filter('.sf-toolbar-info-piece span')->html());
$this->assertSame('mongodb' === $this->env ? DocumentDummy::class : Dummy::class, $block->filter('.sf-toolbar-info-piece span')->html());
}

public function testProfilerGeneralLayoutNotResourceClass()
Expand Down Expand Up @@ -136,7 +136,7 @@ public function testProfilerGeneralLayout()

$metrics = $crawler->filter('.metrics');
$this->assertCount(1, $metrics->filter('.metric'), 'The should be one metric displayed (resource class).');
$this->assertSame('test_mongodb' === $this->env ? DocumentDummy::class : Dummy::class, $metrics->filter('span.value')->html());
$this->assertSame('mongodb' === $this->env ? DocumentDummy::class : Dummy::class, $metrics->filter('span.value')->html());

$this->assertCount(3, $crawler->filter('.sf-tabs .tab'), 'Tabs must be presents on the panel.');

Expand Down Expand Up @@ -177,7 +177,7 @@ public function testGetCollectionProfiler()
// Data provider tab
$tabContent = $crawler->filter('.tab:nth-of-type(2) .tab-content');
$this->assertSame('TRUE', $tabContent->filter('table tbody .status-success')->html());
$this->assertContains('test_mongodb' === $this->env ? OdmCollectionDataProvider::class : CollectionDataProvider::class, $tabContent->filter('table tbody')->html());
$this->assertContains('mongodb' === $this->env ? OdmCollectionDataProvider::class : CollectionDataProvider::class, $tabContent->filter('table tbody')->html());

$this->assertContains('No calls to item data provider have been recorded.', $tabContent->html());
$this->assertContains('No calls to subresource data provider have been recorded.', $tabContent->html());
Expand Down Expand Up @@ -241,7 +241,7 @@ public function testGetItemProfiler()
$this->assertSame(ContainNonResourceItemDataProvider::class, $tabContent->filter('table tbody tr:first-of-type td:nth-of-type(3)')->html());

$this->assertSame('TRUE', $tabContent->filter('table tbody .status-success')->html());
$this->assertContains('test_mongodb' === $this->env ? OdmItemDataProvider::class : ItemDataProvider::class, $tabContent->filter('table tbody')->html());
$this->assertContains('mongodb' === $this->env ? OdmItemDataProvider::class : ItemDataProvider::class, $tabContent->filter('table tbody')->html());

$this->assertContains('No calls to collection data provider have been recorded.', $tabContent->html());
$this->assertContains('No calls to subresource data provider have been recorded.', $tabContent->html());
Expand Down

0 comments on commit 390bb64

Please sign in to comment.