Refactoring tests

This commit is contained in:
Gabriel Caruso
2017-12-06 14:33:46 -02:00
parent 81c2c17fd7
commit c378f6dfbf
9 changed files with 18 additions and 18 deletions

View File

@@ -156,10 +156,10 @@ class ModelTest extends TestCase
$obj->obj = '{}';
$obj->objs = array('{}');
$this->assertEquals("other", $obj->something);
$this->assertTrue(is_array($obj->else));
$this->assertInternalType('array', $obj->else);
$this->assertNull($obj->there);
$this->assertEquals('{}', $obj->obj);
$this->assertTrue(is_array($obj->objs));
$this->assertInternalType('array', $obj->objs);
$this->assertEquals('{}', $obj->objs[0]);
}

View File

@@ -280,7 +280,7 @@ class PayPalModelTest extends TestCase
{
$c1 = new SimpleModelTestClass();
$c1->setField1("a")->setField2($field2);
$this->assertTrue(strpos($c1->toJSON(), "field2") !== !$matches);
$this->assertNotSame(strpos($c1->toJSON(), "field2"), !$matches);
}
public function getProvider()
@@ -332,8 +332,8 @@ class PayPalModelTest extends TestCase
$this->assertEquals($expected, $result);
if ($input) {
$this->assertNotNull($result);
$this->assertTrue(is_array($result));
$this->assertEquals($count, sizeof($result));
$this->assertInternalType('array', $result);
$this->assertCount($count, $result);
}
}