Created
October 10, 2014 20:31
-
-
Save aik099/fc192ba0b9148002421d to your computer and use it in GitHub Desktop.
Example file for PHP_CodeSniffer to demonstrate issues with DocCommentSniff
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
<?php | |
namespace InPortal\Modules\Custom\tests; | |
use Behat\Mink\Element\NodeElement; | |
use InPortal\Core\kernel\tests\BrowserTestCase; | |
class SampleWorkflowTest extends BrowserTestCase | |
{ | |
public function testSample() | |
{ | |
$session = $this->getSession(); | |
$url = $this->Application->HREF('platform/my_account/my_account', '', array('no_amp' => 1)); | |
$session->visit($url); | |
$page = $session->getPage(); | |
$content_box_titles = $page->findAll('css', '.content-box-title'); | |
if ( !$content_box_titles ) { | |
$this->fail('No content boxes found on the page'); | |
} | |
/** @var NodeElement $content_box_title */ | |
$content_box_title = array_shift($content_box_titles); | |
$this->assertEquals('User Registration', trim($content_box_title->getText())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment