-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Escape doctrine entries * Add PDO browsertest
- Loading branch information
Showing
6 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace DebugBar\Tests\Browser; | ||
|
||
use DebugBar\Browser\Bridge\WebDriverElement; | ||
|
||
class PdoTest extends AbstractBrowserTest | ||
{ | ||
public function testMonologCollector(): void | ||
{ | ||
$client = static::createPantherClient(); | ||
|
||
$client->request('GET', '/demo/pdo.php'); | ||
|
||
// Wait for Debugbar to load | ||
$crawler = $client->waitFor('.phpdebugbar-body'); | ||
usleep(1000); | ||
|
||
if (!$this->isTabActive($crawler, 'database')) { | ||
$client->click($this->getTabLink($crawler, 'database')); | ||
} | ||
|
||
$crawler = $client->waitForVisibility('.phpdebugbar-panel[data-collector=database]'); | ||
|
||
$statements = $crawler->filter('.phpdebugbar-panel[data-collector=database] .phpdebugbar-widgets-sql') | ||
->each(function($node){ | ||
return $node->getText(); | ||
}); | ||
|
||
$this->assertEquals('insert into users (name) values (?)', $statements[1]); | ||
$this->assertCount(7, $statements); | ||
} | ||
|
||
} |