Skip to content

Commit

Permalink
Close #69.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 7, 2006
1 parent cb5bdb4 commit 02da933
Showing 1 changed file with 108 additions and 19 deletions.
127 changes: 108 additions & 19 deletions PHPUnit/Extensions/SeleniumTestCase.php
Expand Up @@ -224,7 +224,10 @@ public function setTimeout($timeout)
*/
public function assertAlertPresent()
{
$this->assertTrue($this->isAlertPresent());
$this->assertTrue(
$this->isAlertPresent(),
'No alert present.'
);
}

/**
Expand All @@ -234,7 +237,10 @@ public function assertAlertPresent()
*/
public function assertNoAlertPresent()
{
$this->assertFalse($this->isAlertPresent());
$this->assertFalse(
$this->isAlertPresent(),
'Alert present.'
);
}

/**
Expand All @@ -245,7 +251,13 @@ public function assertNoAlertPresent()
*/
public function assertChecked($locator)
{
$this->assertTrue($this->isChecked($locator));
$this->assertTrue(
$this->isChecked($locator),
sprintf(
'"%s" not checked.',
$locator
)
);
}

/**
Expand All @@ -256,7 +268,13 @@ public function assertChecked($locator)
*/
public function assertNotChecked($locator)
{
$this->assertFalse($this->isChecked($locator));
$this->assertFalse(
$this->isChecked($locator),
sprintf(
'"%s" checked.',
$locator
)
);
}

/**
Expand All @@ -266,7 +284,10 @@ public function assertNotChecked($locator)
*/
public function assertConfirmationPresent()
{
$this->assertTrue($this->isConfirmationPresent());
$this->assertTrue(
$this->isConfirmationPresent(),
'No confirmation present.'
);
}

/**
Expand All @@ -276,7 +297,10 @@ public function assertConfirmationPresent()
*/
public function assertNoConfirmationPresent()
{
$this->assertFalse($this->isConfirmationPresent());
$this->assertFalse(
$this->isConfirmationPresent(),
'Confirmation present.'
);
}

/**
Expand All @@ -287,7 +311,13 @@ public function assertNoConfirmationPresent()
*/
public function assertEditable($locator)
{
$this->assertTrue($this->isEditable($locator));
$this->assertTrue(
$this->isEditable($locator),
sprintf(
'"%s" not editable.',
$locator
)
);
}

/**
Expand All @@ -298,7 +328,13 @@ public function assertEditable($locator)
*/
public function assertNotEditable($locator)
{
$this->assertFalse($this->isEditable($locator));
$this->assertFalse(
$this->isEditable($locator),
sprintf(
'"%s" editable.',
$locator
)
);
}

/**
Expand Down Expand Up @@ -357,7 +393,13 @@ public function assertElementNotContainsText($locator, $text)
*/
public function assertElementPresent($locator)
{
$this->assertTrue($this->isElementPresent($locator));
$this->assertTrue(
$this->isElementPresent($locator),
sprintf(
'Element "%s" not present.',
$locator
)
);
}

/**
Expand All @@ -368,7 +410,13 @@ public function assertElementPresent($locator)
*/
public function assertElementNotPresent($locator)
{
$this->assertFalse($this->isElementPresent($locator));
$this->assertFalse(
$this->isElementPresent($locator),
sprintf(
'Element "%s" present.',
$locator
)
);
}

/**
Expand Down Expand Up @@ -400,7 +448,10 @@ public function assertLocationNotEquals($location)
*/
public function assertPromptPresent()
{
$this->assertTrue($this->isPromptPresent());
$this->assertTrue(
$this->isPromptPresent(),
'No prompt present.'
);
}

/**
Expand All @@ -410,7 +461,10 @@ public function assertPromptPresent()
*/
public function assertNoPromptPresent()
{
$this->assertFalse($this->isPromptPresent());
$this->assertFalse(
$this->isPromptPresent(),
'Prompt present.'
);
}

/**
Expand All @@ -421,7 +475,13 @@ public function assertNoPromptPresent()
*/
public function assertSomethingSelected($selectLocator)
{
$this->assertTrue($this->isSomethingSelected($selectLocator));
$this->assertTrue(
$this->isSomethingSelected($selectLocator),
sprintf(
'Nothing selected from "%s".',
$selectLocator
)
);
}

/**
Expand All @@ -432,7 +492,13 @@ public function assertSomethingSelected($selectLocator)
*/
public function assertNothingSelected($selectLocator)
{
$this->assertFalse($this->isSomethingSelected($selectLocator));
$this->assertFalse(
$this->isSomethingSelected($selectLocator),
sprintf(
'Something selected from "%s".',
$selectLocator
)
);
}

/**
Expand All @@ -443,7 +509,13 @@ public function assertNothingSelected($selectLocator)
*/
public function assertTextPresent($pattern)
{
$this->assertTrue($this->isTextPresent($pattern));
$this->assertTrue(
$this->isTextPresent($pattern),
sprintf(
'"%s" not present.',
$pattern
)
);
}

/**
Expand All @@ -454,7 +526,13 @@ public function assertTextPresent($pattern)
*/
public function assertTextNotPresent($pattern)
{
$this->assertFalse($this->isTextPresent($pattern));
$this->assertFalse(
$this->isTextPresent($pattern),
sprintf(
'"%s" present.',
$pattern
)
);
}

/**
Expand Down Expand Up @@ -487,10 +565,15 @@ public function assertTitleNotEquals($title)
*/
public function assertVisible($locator)
{
$this->assertTrue($this->isVisible($locator));
$this->assertTrue(
$this->isVisible($locator),
sprintf(
'"%s" not visible.',
$locator
)
);
}


/**
* Asserts that something is not visible.
*
Expand All @@ -499,7 +582,13 @@ public function assertVisible($locator)
*/
public function assertNotVisible($locator)
{
$this->assertFalse($this->isVisible($locator));
$this->assertFalse(
$this->isVisible($locator),
sprintf(
'"%s" visible.',
$locator
)
);
}

/**
Expand Down

0 comments on commit 02da933

Please sign in to comment.