Skip to content

Instantly share code, notes, and snippets.

@aik099
Created October 10, 2014 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aik099/fc192ba0b9148002421d to your computer and use it in GitHub Desktop.
Save aik099/fc192ba0b9148002421d to your computer and use it in GitHub Desktop.
Example file for PHP_CodeSniffer to demonstrate issues with DocCommentSniff
<?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