mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 10:39:59 +08:00 
			
		
		
		
	Change @expectException with $this->expectException.
				
					
				
			This commit is contained in:
		| @ -215,19 +215,15 @@ class FixtureControllerTest extends DatabaseTestCase | ||||
|         $this->assertEmpty(FixtureStorage::$firstFixtureData, 'first fixture data should not be loaded'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @expectedException \yii\console\Exception | ||||
|      */ | ||||
|     public function testNoFixturesWereFoundInLoad() | ||||
|     { | ||||
|         $this->expectException('\yii\console\Exception'); | ||||
|         $this->_fixtureController->actionLoad(['NotExistingFixture']); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @expectedException \yii\console\Exception | ||||
|      */ | ||||
|     public function testNoFixturesWereFoundInUnload() | ||||
|     { | ||||
|         $this->expectException('\yii\console\Exception'); | ||||
|         $this->_fixtureController->actionUnload(['NotExistingFixture']); | ||||
|     } | ||||
|  | ||||
|  | ||||
| @ -323,7 +323,7 @@ CODE; | ||||
|  | ||||
|         $output = $this->runMigrateControllerAction('new'); | ||||
|         $this->assertSame(ExitCode::OK, $this->getExitCode()); | ||||
|         $this->assertNotContains('_test_new1', $output); | ||||
|         $this->assertStringNotContainsString('_test_new1', $output); | ||||
|     } | ||||
|  | ||||
|     public function testMark() | ||||
| @ -418,7 +418,7 @@ CODE; | ||||
|         $this->assertSame(ExitCode::OK, $this->getExitCode()); | ||||
|         $files = FileHelper::findFiles($this->migrationPath); | ||||
|         $fileContent = file_get_contents($files[0]); | ||||
|         $this->assertNotContains("namespace {$this->migrationNamespace};", $fileContent); | ||||
|         $this->assertStringNotContainsString("namespace {$this->migrationNamespace};", $fileContent); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|  | ||||
| @ -619,8 +619,7 @@ SQL; | ||||
|      * Test INSERT INTO ... SELECT SQL statement with wrong query object. | ||||
|      * | ||||
|      * @dataProvider invalidSelectColumns | ||||
|      * @expectedException \yii\base\InvalidParamException | ||||
|      * @expectedExceptionMessage Expected select query object with enumerated (named) parameters | ||||
|      *  | ||||
|      * @param mixed $invalidSelectColumns | ||||
|      */ | ||||
|     public function testInsertSelectFailed($invalidSelectColumns) | ||||
| @ -634,6 +633,8 @@ SQL; | ||||
|         $this->expectException(\yii\base\InvalidArgumentException::class); | ||||
|         $this->expectExceptionMessage('Expected select query object with enumerated (named) parameters'); | ||||
|  | ||||
|         $this->expectException('yii\base\InvalidParamException'); | ||||
|         $this->expectExceptionMessage('Expected select query object with enumerated (named) parameters'); | ||||
|         $command->insert('{{customer}}', $query)->execute(); | ||||
|     } | ||||
|  | ||||
|  | ||||
| @ -224,9 +224,6 @@ abstract class ConnectionTest extends DatabaseTestCase | ||||
|         $this->assertTrue(true); // should not be any exception so far | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @expectedException \Exception | ||||
|      */ | ||||
|     public function testTransactionShortcutException() | ||||
|     { | ||||
|         $connection = $this->getConnection(true); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Wilmer Arambula
					Wilmer Arambula