Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpoulain committed Sep 10, 2020
1 parent 875ff2b commit 28c3e45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -30,8 +30,8 @@
use ApiPlatform\Core\Metadata\Resource\ResourceMetadata;
use ApiPlatform\Core\Tests\Fixtures\DummyEntity;
use ApiPlatform\Core\Tests\ProphecyTrait;
use PackageVersions\Versions;
use PHPUnit\Framework\TestCase;
use ProxyManager\Version;
use Psr\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -231,7 +231,7 @@ public function testVersionCollection()
$this->response
);

$this->assertSame(null !== $dataCollector->getVersion(), class_exists(Version::class));
$this->assertSame(null !== $dataCollector->getVersion(), class_exists(Versions::class));
}

private function apiResourceClassWillReturn($data, $context = [])
Expand Down
Expand Up @@ -81,7 +81,7 @@ public function testDebugBarContentNotResourceClass()

// Check extra info content
$this->assertStringContainsString('sf-toolbar-status-default', $block->attr('class'), 'The toolbar block should have the default color.');
$this->assertSame('Not an API Platform resource', $block->filter('.sf-toolbar-info-piece span')->html());
$this->assertSame('Not an API Platform resource', $block->filterXPath('//div[@class="sf-toolbar-info-piece"][./b[contains(., "Resource Class")]]/span')->html());
}

public function testDebugBarContent()
Expand All @@ -99,7 +99,7 @@ public function testDebugBarContent()

// Check extra info content
$this->assertStringContainsString('sf-toolbar-status-default', $block->attr('class'), 'The toolbar block should have the default color.');
$this->assertSame('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->filterXPath('//div[@class="sf-toolbar-info-piece"][./b[contains(., "Resource Class")]]/span')->html());
}

public function testProfilerGeneralLayoutNotResourceClass()
Expand Down

0 comments on commit 28c3e45

Please sign in to comment.