Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F872138
SampleWorkflowTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 8, 10:01 AM
Size
1012 B
Mime Type
text/x-php
Expires
Sat, May 10, 10:01 AM (16 h, 45 m)
Engine
blob
Format
Raw Data
Handle
617806
Attached To
rMCUS Modules.Custom
SampleWorkflowTest.php
View Options
<?php
use
Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains
;
class
SampleWorkflowTest
extends
AbstractBrowserTestCase
{
use
AssertStringContains
;
public
function
testSampleWithoutPageObjects
()
{
$session
=
$this
->
getSession
();
$url
=
$this
->
Application
->
HREF
(
'platform/login/register'
,
''
,
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'
);
}
$content_box_title
=
array_shift
(
$content_box_titles
);
$this
->
assertEquals
(
'User Registration'
,
trim
(
$content_box_title
->
getText
()));
}
public
function
testSampleWithPageObjects
()
{
$user_registration_page
=
new
UserRegistrationPage
(
$this
->
pageFactory
);
$user_registration_page
->
open
();
$user_registration_page
->
loginButton
->
click
();
$this
->
assertStringContainsString
(
'Incorrect Username or Password'
,
$user_registration_page
->
getText
());
}
}
Event Timeline
Log In to Comment