Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F864348
custom
No One
Temporary
Actions
View 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
Sat, May 3, 5:11 PM
Size
7 KB
Mime Type
text/x-diff
Expires
Mon, May 5, 5:11 PM (8 h, 29 m)
Engine
blob
Format
Raw Data
Handle
614228
Attached To
rMCUS Modules.Custom
custom
View Options
Index: branches/1.2.x/tests/SampleWorkflowTest.php
===================================================================
--- branches/1.2.x/tests/SampleWorkflowTest.php (revision 16822)
+++ branches/1.2.x/tests/SampleWorkflowTest.php (nonexistent)
@@ -1,40 +0,0 @@
-<?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());
- }
-
-}
Property changes on: branches/1.2.x/tests/SampleWorkflowTest.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/tests/SampleUnitTest.php
===================================================================
--- branches/1.2.x/tests/SampleUnitTest.php (revision 16822)
+++ branches/1.2.x/tests/SampleUnitTest.php (nonexistent)
@@ -1,32 +0,0 @@
-<?php
-
-
-class SampleUnitTest extends AbstractTestCase
-{
-
- /**
- * @before
- */
- public function setUpTest()
- {
-
- }
-
- /**
- * @after
- */
- public function tearDownTest()
- {
-
- }
-
- public function testSample()
- {
- $this->assertEquals(
- '/admin',
- kUtil::getSystemConfig()->get('AdminDirectory'),
- 'Default admin directory is wrong'
- );
- }
-
-}
Property changes on: branches/1.2.x/tests/SampleUnitTest.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/tests/pages/UserRegistrationPage.php
===================================================================
--- branches/1.2.x/tests/pages/UserRegistrationPage.php (revision 16822)
+++ branches/1.2.x/tests/pages/UserRegistrationPage.php (nonexistent)
@@ -1,19 +0,0 @@
-<?php
-
-use QATools\QATools\HtmlElements\Element\Button;
-
-/**
- * @page-url('platform/login/register', 'params' => array('p1' => 'v1'))
- */
-final class UserRegistrationPage extends Page
-{
-
- /**
- * Registration button.
- *
- * @var Button
- * @find-by('name' => 'events[u.login-sidebox][OnLogin]')
- */
- public $loginButton;
-
-}
Property changes on: branches/1.2.x/tests/pages/UserRegistrationPage.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/1.2.x/tests/Functional/SampleWorkflowTest.php
===================================================================
--- branches/1.2.x/tests/Functional/SampleWorkflowTest.php (nonexistent)
+++ branches/1.2.x/tests/Functional/SampleWorkflowTest.php (revision 16823)
@@ -0,0 +1,40 @@
+<?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());
+ }
+
+}
Property changes on: branches/1.2.x/tests/Functional/SampleWorkflowTest.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/tests/PageObject/UserRegistrationPage.php
===================================================================
--- branches/1.2.x/tests/PageObject/UserRegistrationPage.php (nonexistent)
+++ branches/1.2.x/tests/PageObject/UserRegistrationPage.php (revision 16823)
@@ -0,0 +1,19 @@
+<?php
+
+use QATools\QATools\HtmlElements\Element\Button;
+
+/**
+ * @page-url('platform/login/register', 'params' => array('p1' => 'v1'))
+ */
+final class UserRegistrationPage extends Page
+{
+
+ /**
+ * Registration button.
+ *
+ * @var Button
+ * @find-by('name' => 'events[u.login-sidebox][OnLogin]')
+ */
+ public $loginButton;
+
+}
Property changes on: branches/1.2.x/tests/PageObject/UserRegistrationPage.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/tests/Unit/SampleUnitTest.php
===================================================================
--- branches/1.2.x/tests/Unit/SampleUnitTest.php (nonexistent)
+++ branches/1.2.x/tests/Unit/SampleUnitTest.php (revision 16823)
@@ -0,0 +1,32 @@
+<?php
+
+
+class SampleUnitTest extends AbstractTestCase
+{
+
+ /**
+ * @before
+ */
+ public function setUpTest()
+ {
+
+ }
+
+ /**
+ * @after
+ */
+ public function tearDownTest()
+ {
+
+ }
+
+ public function testSample()
+ {
+ $this->assertEquals(
+ '/admin',
+ kUtil::getSystemConfig()->get('AdminDirectory'),
+ 'Default admin directory is wrong'
+ );
+ }
+
+}
Property changes on: branches/1.2.x/tests/Unit/SampleUnitTest.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/1.2.x/tests/tests_config.php
===================================================================
--- branches/1.2.x/tests/tests_config.php (revision 16822)
+++ branches/1.2.x/tests/tests_config.php (revision 16823)
@@ -1,12 +1,12 @@
<?php
defined('FULL_PATH') or die('restricted access!');
$config = array(
'Prefix' => 'custom-tests',
'EventHandlerClass' => array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => array(
- array('pseudo' => 'UserRegistrationPage', 'class' => 'UserRegistrationPage', 'file' => 'pages/UserRegistrationPage.php'),
+ array('pseudo' => 'UserRegistrationPage', 'class' => 'UserRegistrationPage', 'file' => 'PageObject/UserRegistrationPage.php'),
),
);
Event Timeline
Log In to Comment