Created
January 23, 2019 12:53
-
-
Save tleilax/ae2c34fd3bc58eac26f70f13313c18f6 to your computer and use it in GitHub Desktop.
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
Index: tests/unit/lib/CalendarcolumnClassTest.php | |
=================================================================== | |
--- tests/unit/lib/CalendarcolumnClassTest.php (revision 50714) | |
+++ tests/unit/lib/CalendarcolumnClassTest.php (working copy) | |
@@ -83,7 +83,7 @@ | |
} | |
function test_wrong_entry() { | |
- $this->setExpectedException('InvalidArgumentException'); | |
+ $this->expectException('InvalidArgumentException'); | |
$entry1 = array('start' => "0800", 'end' => "1000"); | |
$entry2 = array('start' => "1000", 'title' => "test_title"); | |
$entry3 = array('end' => "1500", 'title' => "test_title"); | |
Index: tests/unit/lib/CalendarviewClassTest.php | |
=================================================================== | |
--- tests/unit/lib/CalendarviewClassTest.php (revision 50714) | |
+++ tests/unit/lib/CalendarviewClassTest.php (working copy) | |
@@ -69,7 +69,7 @@ | |
} | |
public function test_negative_addEntry() { | |
- $this->setExpectedException('InvalidArgumentException'); | |
+ $this->expectException('InvalidArgumentException'); | |
$view = new CalendarView(); | |
$entry = array( | |
'title' => "Test Eintrag", | |
@@ -104,5 +104,3 @@ | |
//Die anderen Methoden muss Till testen. | |
} | |
- | |
- | |
Index: tests/unit/lib/classes/AvatarClassTest.php | |
=================================================================== | |
--- tests/unit/lib/classes/AvatarClassTest.php (revision 50714) | |
+++ tests/unit/lib/classes/AvatarClassTest.php (working copy) | |
@@ -30,7 +30,7 @@ | |
function setUp() | |
{ | |
- $stub = $this->getMock('Seminar_Perm'); | |
+ $stub = $this->createMock('Seminar_Perm'); | |
// Configure the stub. | |
$stub->expects($this->any()) | |
->method('have_perm') | |
Index: tests/unit/lib/classes/CsrfProtectionTest.php | |
=================================================================== | |
--- tests/unit/lib/classes/CsrfProtectionTest.php (revision 50714) | |
+++ tests/unit/lib/classes/CsrfProtectionTest.php (working copy) | |
@@ -90,7 +90,7 @@ | |
function testInvalidUnsafeRequest() | |
{ | |
- $this->setExpectedException('InvalidSecurityTokenException'); | |
+ $this->expectException('InvalidSecurityTokenException'); | |
$_SERVER['REQUEST_METHOD'] = 'POST'; | |
CSRFProtection::verifyUnsafeRequest(); | |
} | |
@@ -106,7 +106,7 @@ | |
function testSafeRequest() | |
{ | |
$_SERVER['REQUEST_METHOD'] = 'GET'; | |
- $this->setExpectedException('MethodNotAllowedException'); | |
+ $this->expectException('MethodNotAllowedException'); | |
CSRFProtection::verifyUnsafeRequest(); | |
} | |
@@ -114,7 +114,7 @@ | |
{ | |
$_SERVER['REQUEST_METHOD'] = 'GET'; | |
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XmlHttpRequest'; | |
- $this->setExpectedException('MethodNotAllowedException'); | |
+ $this->expectException('MethodNotAllowedException'); | |
CSRFProtection::verifyUnsafeRequest(); | |
} | |
Index: tests/unit/lib/classes/NavigationTest.php | |
=================================================================== | |
--- tests/unit/lib/classes/NavigationTest.php (revision 50714) | |
+++ tests/unit/lib/classes/NavigationTest.php (working copy) | |
@@ -164,7 +164,7 @@ | |
public function testExceptionOnGet () | |
{ | |
- $this->setExpectedException('InvalidArgumentException'); | |
+ $this->expectException('InvalidArgumentException'); | |
Navigation::getItem('/test'); | |
} | |
@@ -171,7 +171,7 @@ | |
public function testExceptionOnAdd () | |
{ | |
$navigation = new Navigation('test'); | |
- $this->setExpectedException('InvalidArgumentException'); | |
+ $this->expectException('InvalidArgumentException'); | |
Navigation::addItem('/test/foo', $navigation); | |
} | |
} | |
@@ -184,7 +184,7 @@ | |
$navigation = new Navigation('test'); | |
Navigation::addItem('/test', $navigation); | |
- $observer = $this->getMock("NotificationObserver"); | |
+ $observer = $this->createMock('NotificationObserver'); | |
$observer->expects($this->once()) | |
->method('update') | |
->with($this->equalTo('NavigationDidActivateItem'), | |
Index: tests/unit/lib/classes/NotificationCenterTest.php | |
=================================================================== | |
--- tests/unit/lib/classes/NotificationCenterTest.php (revision 50714) | |
+++ tests/unit/lib/classes/NotificationCenterTest.php (working copy) | |
@@ -38,7 +38,7 @@ | |
{ | |
public function setUp() | |
{ | |
- $this->observer = $this->getMock("Observer"); | |
+ $this->observer = $this->createMock("Observer"); | |
$this->subject = new stdClass(); | |
NotificationCenter::addObserver($this->observer, 'update', NULL); | |
@@ -95,7 +95,7 @@ | |
{ | |
$this->observer->expects($this->exactly(4))->method('update'); | |
- $observer = $this->getMock("Observer"); | |
+ $observer = $this->createMock('Observer'); | |
NotificationCenter::removeObserver($observer); | |
NotificationCenter::postNotification('foo', $this->subject); | |
} | |
@@ -215,7 +215,7 @@ | |
$subject = new stdClass(); | |
// register observer | |
- $wildcard = $this->getMock("Observer"); | |
+ $wildcard = $this->createMock('Observer'); | |
$wildcard->expects($this->once())->method('update')->with('foo', $subject, $user_data); | |
NotificationCenter::addObserver($wildcard, 'update', NULL); | |
@@ -235,7 +235,7 @@ | |
$subject = new stdClass(); | |
// register observer | |
- $wildcard = $this->getMock("Observer"); | |
+ $wildcard = $this->createMock('Observer'); | |
$wildcard->expects($this->once())->method('update')->with('foobar', $subject, $user_data); | |
NotificationCenter::addObserver($wildcard, 'update', 'foo*'); | |
@@ -253,7 +253,7 @@ | |
function assertMatchingNotification($matcher, $subject) | |
{ | |
// register observer | |
- $observer = $this->getMock("Observer"); | |
+ $observer = $this->createMock('Observer'); | |
NotificationCenter::addObserver($observer, 'update', | |
'SomeNotification', $matcher); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment