mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix most code standards errors in Case/TestSuite.
This commit is contained in:
parent
fc234d82f1
commit
7798914676
5 changed files with 35 additions and 44 deletions
|
@ -338,4 +338,5 @@ class CakeTestCaseTest extends CakeTestCase {
|
|||
|
||||
$this->assertTextNotContains("different\rlines", $stringDirty);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -155,15 +155,23 @@ class CakeTestFixtureDefaultImportFixture extends CakeTestFixture {
|
|||
* @package Cake.Test.Case.TestSuite
|
||||
*/
|
||||
class FixtureImportTestModel extends Model {
|
||||
|
||||
public $name = 'FixtureImport';
|
||||
|
||||
public $useTable = 'fixture_tests';
|
||||
|
||||
public $useDbConfig = 'test';
|
||||
|
||||
}
|
||||
|
||||
class FixturePrefixTest extends Model {
|
||||
|
||||
public $name = 'FixturePrefix';
|
||||
|
||||
public $useTable = '_tests';
|
||||
|
||||
public $tablePrefix = 'fixture';
|
||||
|
||||
public $useDbConfig = 'test';
|
||||
}
|
||||
|
||||
|
@ -218,9 +226,9 @@ class CakeTestFixtureTest extends CakeTestCase {
|
|||
$this->assertEquals($Fixture->primaryKey, 'my_random_key');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test that init() correctly sets the fixture table when the connection or model have prefixes defined.
|
||||
* test that init() correctly sets the fixture table when the connection
|
||||
* or model have prefixes defined.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -359,7 +367,6 @@ class CakeTestFixtureTest extends CakeTestCase {
|
|||
$Source->create($newTestSuiteDb);
|
||||
$Source->insert($newTestSuiteDb);
|
||||
|
||||
|
||||
$Fixture = new CakeTestFixtureDefaultImportFixture();
|
||||
$Fixture->fields = $Fixture->records = null;
|
||||
$Fixture->import = array(
|
||||
|
|
|
@ -20,24 +20,6 @@
|
|||
*/
|
||||
class CakeTestSuiteTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* testAddTestDirectory
|
||||
*
|
||||
|
|
|
@ -26,7 +26,6 @@ App::uses('CakeHtmlReporter', 'TestSuite/Reporter');
|
|||
|
||||
require_once dirname(dirname(__FILE__)) . DS . 'Model' . DS . 'models.php';
|
||||
|
||||
|
||||
/**
|
||||
* AppController class
|
||||
*
|
||||
|
@ -36,9 +35,10 @@ if (!class_exists('AppController', false)) {
|
|||
/**
|
||||
* AppController class
|
||||
*
|
||||
* @package Cake.Test.Case.TestSuite
|
||||
* @package Cake.Test.Case.TestSuite
|
||||
*/
|
||||
class AppController extends Controller {
|
||||
|
||||
/**
|
||||
* helpers property
|
||||
*
|
||||
|
@ -46,6 +46,7 @@ if (!class_exists('AppController', false)) {
|
|||
* @access public
|
||||
*/
|
||||
public $helpers = array('Html');
|
||||
|
||||
/**
|
||||
* uses property
|
||||
*
|
||||
|
@ -53,6 +54,7 @@ if (!class_exists('AppController', false)) {
|
|||
* @access public
|
||||
*/
|
||||
public $uses = array('ControllerPost');
|
||||
|
||||
/**
|
||||
* components property
|
||||
*
|
||||
|
@ -60,6 +62,7 @@ if (!class_exists('AppController', false)) {
|
|||
* @access public
|
||||
*/
|
||||
public $components = array('Cookie');
|
||||
|
||||
}
|
||||
} elseif (!defined('APP_CONTROLLER_EXISTS')) {
|
||||
define('APP_CONTROLLER_EXISTS', true);
|
||||
|
@ -238,7 +241,6 @@ class ControllerTestCaseTest extends CakeTestCase {
|
|||
->will($this->returnValue(false));
|
||||
$this->assertTrue($Tests->TestPluginComment->save(array()));
|
||||
$this->assertFalse($Tests->TestPluginComment->save(array()));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ App::uses('HtmlCoverageReport', 'TestSuite/Coverage');
|
|||
App::uses('CakeBaseReporter', 'TestSuite/Reporter');
|
||||
|
||||
class HtmlCoverageReportTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
|
@ -127,7 +128,6 @@ class HtmlCoverageReportTest extends CakeTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test that coverage works with phpunit 3.6 as the data formats from coverage are totally different.
|
||||
*
|
||||
|
@ -198,7 +198,6 @@ class HtmlCoverageReportTest extends CakeTestCase {
|
|||
5 => -1
|
||||
);
|
||||
|
||||
|
||||
$result = $this->Coverage->generateDiff('myfile.php', $file, $coverage);
|
||||
|
||||
$this->assertTrue(
|
||||
|
|
Loading…
Reference in a new issue