summaryrefslogtreecommitdiffstats
path: root/tests/Components
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Components')
-rw-r--r--tests/Components/Array2dTest.php16
-rw-r--r--tests/Components/CreateDefinitionTest.php2
-rw-r--r--tests/Components/ExpressionArrayTest.php2
-rw-r--r--tests/Components/JoinKeywordTest.php10
-rw-r--r--tests/Components/KeyTest.php2
5 files changed, 16 insertions, 16 deletions
diff --git a/tests/Components/Array2dTest.php b/tests/Components/Array2dTest.php
index b7ee756..a4dd7b5 100644
--- a/tests/Components/Array2dTest.php
+++ b/tests/Components/Array2dTest.php
@@ -44,9 +44,9 @@ class Array2dTest extends TestCase
{
$parser = new Parser();
Array2d::parse($parser, $this->getTokensList(')'));
- $this->assertEquals(
+ $this->assertCount(
1,
- count($parser->errors)
+ $parser->errors
);
$this->assertEquals(
'An opening bracket followed by a set of values was expected.',
@@ -58,9 +58,9 @@ class Array2dTest extends TestCase
{
$parser = new Parser();
Array2d::parse($parser, $this->getTokensList('TABLE'));
- $this->assertEquals(
+ $this->assertCount(
1,
- count($parser->errors)
+ $parser->errors
);
$this->assertEquals(
'An opening bracket followed by a set of values was expected.',
@@ -72,9 +72,9 @@ class Array2dTest extends TestCase
{
$parser = new Parser();
Array2d::parse($parser, $this->getTokensList('(1, 2),'));
- $this->assertEquals(
+ $this->assertCount(
1,
- count($parser->errors)
+ $parser->errors
);
$this->assertEquals(
'An opening bracket followed by a set of values was expected.',
@@ -86,9 +86,9 @@ class Array2dTest extends TestCase
{
$parser = new Parser();
Array2d::parse($parser, $this->getTokensList('(1, 2),(3)'));
- $this->assertEquals(
+ $this->assertCount(
1,
- count($parser->errors)
+ $parser->errors
);
$this->assertEquals(
'2 values were expected, but found 1.',
diff --git a/tests/Components/CreateDefinitionTest.php b/tests/Components/CreateDefinitionTest.php
index 57d5add..b14708c 100644
--- a/tests/Components/CreateDefinitionTest.php
+++ b/tests/Components/CreateDefinitionTest.php
@@ -27,7 +27,7 @@ class CreateDefinitionTest extends TestCase
$parser,
$this->getTokensList('(str TEXT, FULLTEXT INDEX indx (str)')
);
- $this->assertEquals(2, count($component));
+ $this->assertCount(2, $component);
$this->assertEquals(
'A closing bracket was expected.',
diff --git a/tests/Components/ExpressionArrayTest.php b/tests/Components/ExpressionArrayTest.php
index 2c5527d..cd413ac 100644
--- a/tests/Components/ExpressionArrayTest.php
+++ b/tests/Components/ExpressionArrayTest.php
@@ -29,7 +29,7 @@ class ExpressionArrayTest extends TestCase
'parenthesesDelimited' => true,
)
);
- $this->assertEquals(1, count($component));
+ $this->assertCount(1, $component);
$this->assertEquals('(expr)', $component[0]->expr);
}
}
diff --git a/tests/Components/JoinKeywordTest.php b/tests/Components/JoinKeywordTest.php
index fbe2d40..8baf93f 100644
--- a/tests/Components/JoinKeywordTest.php
+++ b/tests/Components/JoinKeywordTest.php
@@ -11,18 +11,18 @@ class JoinKeywordTest extends TestCase
public function testParseIncomplete()
{
$component = JoinKeyword::parse(new Parser(), $this->getTokensList('JOIN a'));
- $this->assertEquals(1, count($component));
+ $this->assertCount(1, $component);
$this->assertEquals('a', $component[0]->expr->expr);
- $this->assertEquals(null, $component[0]->on);
- $this->assertEquals(null, $component[0]->using);
+ $this->assertNull($component[0]->on);
+ $this->assertNull($component[0]->using);
}
public function testParseIncompleteUsing()
{
$component = JoinKeyword::parse(new Parser(), $this->getTokensList('JOIN table2 USING (id)'));
- $this->assertEquals(1, count($component));
+ $this->assertCount(1, $component);
$this->assertEquals('table2', $component[0]->expr->expr);
- $this->assertEquals(null, $component[0]->on);
+ $this->assertNull($component[0]->on);
$this->assertEquals(array('id'), $component[0]->using->values);
}
diff --git a/tests/Components/KeyTest.php b/tests/Components/KeyTest.php
index ed05288..c27b9d8 100644
--- a/tests/Components/KeyTest.php
+++ b/tests/Components/KeyTest.php
@@ -14,6 +14,6 @@ class KeyTest extends TestCase
new Parser(),
$this->getTokensList('')
);
- $this->assertEquals(null, $component->name);
+ $this->assertNull($component->name);
}
}