Skip to content

Commit cc41bb9

Browse files
committed
PHPUnit 10 Minor Unit test fixes
1 parent bbfb82b commit cc41bb9

File tree

1 file changed

+6
-21
lines changed
  • dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event

1 file changed

+6
-21
lines changed

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/PhpUnitTest.php

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,14 @@ public static function doNotFireEventDataProvider()
7575

7676
public function testStartTestSuiteFireEvent()
7777
{
78-
$this->_eventManager->expects($this->once())->method('fireEvent')->with('testSuiteStarted');
78+
$this->_eventManager->expects($this->once())->method('fireEvent')->with('startTestSuite');
7979
$this->_object->startTestSuite(TestSuite::empty('TestSuite'));
8080
}
81-
82-
// public function testStartTestSuiteDoNotFireEvent()
83-
// {
84-
// $this->_eventManager->expects($this->never())->method('fireEvent');
85-
// $this->_object->startTestSuite(new \PHPUnit\Framework\DataProviderTestSuite());
86-
// }
87-
//
88-
// public function testEndTestSuiteFireEvent()
89-
// {
90-
// $this->_eventManager->expects($this->once())->method('fireEvent')->with('endTestSuite');
91-
// $this->_object->endTestSuite(new \PHPUnit\Framework\TestSuite());
92-
// }
93-
//
94-
// public function testEndTestSuiteDoNotFireEvent()
95-
// {
96-
// $this->_eventManager->expects($this->never())->method('fireEvent');
97-
// $this->_object->endTestSuite(new \PHPUnit\Framework\DataProviderTestSuite());
98-
// }
81+
public function testEndTestSuiteFireEvent()
82+
{
83+
$this->_eventManager->expects($this->once())->method('fireEvent')->with('endTestSuite');
84+
$this->_object->endTestSuite(TestSuite::empty('TestSuite'));
85+
}
9986

10087
public function testStartTestFireEvent()
10188
{
@@ -106,7 +93,6 @@ public function testStartTestFireEvent()
10693
public function testStartTestDoNotFireEvent()
10794
{
10895
$this->_eventManager->expects($this->never())->method('fireEvent');
109-
// $this->_object->startTest(new \PHPUnit\Framework\Warning());
11096
$this->_object->startTest($this->createMock(\PHPUnit\Framework\Test::class));
11197
}
11298

@@ -119,7 +105,6 @@ public function testEndTestFireEvent()
119105
public function testEndTestDoNotFireEvent()
120106
{
121107
$this->_eventManager->expects($this->never())->method('fireEvent');
122-
// $this->_object->endTest(new \PHPUnit\Framework\Warning(), 0);
123108
$this->_object->endTest($this->createMock(\PHPUnit\Framework\Test::class), 0);
124109
}
125110
}

0 commit comments

Comments
 (0)