Commit 809eeb43 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

TableManager OK

parent 399baa6b
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -75,7 +75,9 @@ class SequenceManager extends AbstractManager implements SequenceManagerInterfac

        $name = Util::fullObjectName($data['schema'] ?? null, $data['name']);

        $sql = "CREATE SEQUENCE $name INCREMENT BY 1 MINVALUE 1";
        $minValue = isset($data['minvalue']) ? (int)$data['minvalue'] : 1;

        $sql = "CREATE SEQUENCE $name INCREMENT BY 1 MINVALUE $minValue";
        $this->addQuery($sql, 'Ajout de la séquence ' . $name);
    }

+269 −113

File changed.

Preview size limit exceeded, changes collapsed.

+8 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ abstract class AbstractBddProtocoleTestCase extends AbstractBddTestCase
            }
            if (isset($action['expected'])) {
                if (is_array($action['expected'])) {
                    $this->assertArrayEquals($action['expected'], $result, true);
                    $this->assertArrayEquals($result, $action['expected']);
                } else {
                    $this->assertEquals($action['expected'], $result);
                }
@@ -43,7 +43,13 @@ abstract class AbstractBddProtocoleTestCase extends AbstractBddTestCase
                $this->assertTrue(true);
            }
        } catch (\Exception $e) {
            echo "\n" . $this->bddName . ' ' . $action['manager'] . '->' . $action['method'] . ' : ' . $e->getMessage();
            echo "\n" . $this->bddName . ' ' . $action['manager'] . '->' . $action['method'] . ' : ' . $e->getMessage()."\n";
            echo $e->getFile().' line '.$e->getLine()."\n";
            foreach( $e->getTrace() as $t){
                if (str_contains($t['file'], '/bddadmin/')){
                    echo $t['file'] . ' line ' . $t['line'] . "\n";
                }
            }
            $this->assertTrue(false);
        }
    }
+2 −3
Original line number Diff line number Diff line
@@ -8,11 +8,10 @@ final class CustomTest extends AbstractBddTestCase
{
    protected string $bddName = 'Postgresql';



    public function testSeq()
    {
        $l = $this->bdd->table()->getList();

var_dump($l);

        $this->assertTrue(true);
    }
+9 −0
Original line number Diff line number Diff line
@@ -3,4 +3,13 @@
final class PostgresqlTest extends AbstractBddProtocoleTestCase
{
    protected string $bddName = 'Postgresql';

    protected function setUp(): void
    {
        parent::setUp();

        $sql = "DROP SCHEMA IF EXISTS bddadmintests CASCADE";

        $this->bdd->exec($sql);
    }
}
Loading