Browse Source

fix unit tests

tags/3.0.0-alpha1
Paul Klimov 7 years ago
parent
commit
9ef1c44749
  1. 1
      phpunit.xml.dist
  2. 3
      tests/framework/ChangeLogTest.php
  3. 3
      tests/framework/db/QueryTest.php

1
phpunit.xml.dist

@ -2,6 +2,7 @@
<phpunit bootstrap="./tests/bootstrap.php"
backupGlobals="true"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"

3
tests/framework/ChangeLogTest.php

@ -49,6 +49,7 @@ class ChangeLogTest extends TestCase
* - Description ends without a "."
* - Line ends with contributor name between "(" and ")".
*/
$this->assertRegExp('/- (Bug|Enh|Chg|New)( #\d+(, #\d+)*)?: .*[^.] \(.*\)$/', $line);
//$this->assertRegExp('/- (Bug|Enh|Chg|New)( #\d+(, #\d+)*)?: .*[^.] \(.*\)$/', $line);
$this->assertRegExp('/- (Bug|Enh|Chg|New)( #\d+(, #\d+)*( \(CVE\-\d+\-\d+\))*)?: .*[^.] \(.*\)$/', $line);
}
}

3
tests/framework/db/QueryTest.php

@ -8,6 +8,7 @@
namespace yiiunit\framework\db;
use yii\caching\ArrayCache;
use yii\caching\Cache;
use yii\db\Connection;
use yii\db\Expression;
use yii\db\Query;
@ -627,7 +628,7 @@ abstract class QueryTest extends DatabaseTestCase
{
$db = $this->getConnection();
$db->enableQueryCache = true;
$db->queryCache = new ArrayCache();
$db->queryCache = new Cache(['handler' => new ArrayCache()]);
$query = (new Query())
->select(['name'])
->from('customer');

Loading…
Cancel
Save