Open Tanktiger opened 1 year ago
I'll try to have a look tomorrow when travelling.
Hello, the problem was in a PHPUnit Test class. I don't know why this error is occuring but i removed the class and everything worked.
Here is the class and the problem occurs in the function testDatabaseUtilsGetInstalledMigrationVersion2
<?php
namespace Library\Tests;
use Codeception\PHPUnit\TestCase;
use Library\Helper\Converter;
use Library\Helper\DatabaseUtils;
use Library\Helper\Generator;
use Library\Helper\Hashing;
use Library\Helper\Validator;
use Library\Helper\VersionHelper;
class HelperTest extends TestCase
{
public function testConverter()
{
$this->assertEquals("Test", Converter::firstLetterUp("test"));
$this->assertEquals("Test", Converter::firstLetterUp("TEST"));
$this->assertEquals("Test3", Converter::firstLetterUp("TesT3"));
$this->assertEquals(61445, Converter::hexStringToInteger("F005"));
$this->assertEquals(61444, Converter::hexStringToInteger("F004"));
$this->assertEquals(0, Converter::hexStringToInteger("00"));
$this->assertEquals(4294967295, Converter::hexStringToInteger("FFFFFFFF"));
}
public function testGenerator()
{
$generated = Generator::uniqueString(4);
$generated2 = Generator::uniqueString(32);
$this->assertFalse($generated === $generated2);
$this->assertEquals(4, strlen($generated));
$this->assertEquals(32, strlen($generated2));
}
public function testHashing()
{
$hashedPW = Hashing::hashPassword("test");
$this->assertTrue(Hashing::verifyPassword("test", $hashedPW));
$this->assertfalse(Hashing::verifyPassword("test2", $hashedPW));
$this->assertfalse(Hashing::verifyPassword($hashedPW, "test"));
}
public function testValidator()
{
$this->assertTrue(Validator::isValidMAC("00:00:00:00:00:00"));
$this->assertTrue(Validator::isValidMAC("AF:FE:AF:FE:AF:FE"));
$this->assertTrue(Validator::isValidMAC("01:23:45:67:89:0A"));
$this->assertTrue(Validator::isValidMAC("BC:CD:DE:EF:FF:11"));
$this->assertTrue(Validator::isValidMAC("01:23:45:67:89:0a"));
$this->assertTrue(Validator::isValidMAC("bc:cd:de:ef:ff:11"));
$this->assertfalse(Validator::isValidMAC("00:00:00:00:00:g0"));
$this->assertfalse(Validator::isValidMAC("00:00:00:00:00:G0"));
$this->assertfalse(Validator::isValidMAC("00:00:00:00:00G0"));
$this->assertfalse(Validator::isValidMAC("00:00:00:00:0010"));
$this->assertfalse(Validator::isValidMAC("00:00:00:00:00: 0"));
$this->assertfalse(Validator::isValidMAC("000000000000"));
}
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testDatabaseUtilsGetInstalledMigrationVersion2()
{
$mock = \Mockery::mock("overload:\\App\\Core\\Models\\SharedMigration");
$mock->shouldReceive('tableExists')
->once()
->andReturn(false);
$migratedVersion = DatabaseUtils::getInstalledMigrationVersion();
$this->assertNull($migratedVersion);
}
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testDatabaseUtilsGetInstalledMigrationVersion3()
{
$mock = \Mockery::mock("overload:\\App\\Core\\Models\\SharedMigration");
$mock->shouldReceive('tableExists')
->once()
->andReturn(true);
$mock->shouldReceive('findFirst')
->once()
->andReturn(false);
$migratedVersion = DatabaseUtils::getInstalledMigrationVersion();
$this->assertNull($migratedVersion);
}
}
Thanks for the heads up :)
Hello,
i want to generate the documentation for my phalcon PHP code. It worked for several years but now i'm getting this error:
My XML:
PHPDox is installed via composer and xdebug is installed in version 2.9.8
Does someone know how to fix this issue?