CS fixer stronger checks

This commit is contained in:
troosan 2017-11-22 09:43:35 +01:00
parent 6a5d2a636d
commit b4b87cd1dc
3 changed files with 3 additions and 5 deletions

View File

@ -37,8 +37,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
$this->assertEquals($src, $oImage->getSource());
$this->assertEquals(md5($src), $oImage->getMediaId());
// todo: change to assertNotTrue when got upgraded to PHPUnit 4.x
$this->assertEquals(false, $oImage->isWatermark());
$this->assertFalse($oImage->isWatermark());
$this->assertEquals(Image::SOURCE_LOCAL, $oImage->getSourceType());
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle());
}

View File

@ -121,7 +121,7 @@ class ConverterTest extends \PHPUnit\Framework\TestCase
*/
public function testCssSizeParser()
{
$this->assertEquals(null, Converter::cssToPoint('10em'));
$this->assertNull(Converter::cssToPoint('10em'));
$this->assertEquals(0, Converter::cssToPoint('0'));
$this->assertEquals(10, Converter::cssToPoint('10pt'));
$this->assertEquals(7.5, Converter::cssToPoint('10px'));

View File

@ -56,8 +56,7 @@ class AbstractStyleTest extends \PHPUnit\Framework\TestCase
{
$stub = $this->getMockForAbstractClass('\PhpOffice\PhpWord\Style\AbstractStyle');
// todo: change to assertNotTrue when got upgraded to PHPUnit 4.x
$this->assertEquals(false, self::callProtectedMethod($stub, 'setBoolVal', array('a', false)));
$this->assertNotTrue(self::callProtectedMethod($stub, 'setBoolVal', array('a', false)));
$this->assertEquals(200, self::callProtectedMethod($stub, 'setIntVal', array('foo', 200)));
$this->assertEquals(2.1, self::callProtectedMethod($stub, 'setFloatVal', array('foo', 2.1)));
$this->assertEquals('b', self::callProtectedMethod($stub, 'setEnumVal', array(null, array('a', 'b'), 'b')));