public function testActions() { $constraint = new ForeignKey('name', 'column', 'parent_table', 'column', 'CASCADE', 'CASCADE'); $this->assertSame('CASCADE', $constraint->getUpdateRule()); $this->assertSame('CASCADE', $constraint->getDeleteRule()); $constraint = new ForeignKey('name', 'column', 'parent_table', 'column', 'NO ACTION', 'NO ACTION'); $this->assertSame('RESTRICT', $constraint->getUpdateRule()); $this->assertSame('RESTRICT', $constraint->getDeleteRule()); $constraint = new ForeignKey('name', 'column', 'parent_table', 'column', 'SET DEFAULT', 'SET DEFAULT'); $this->assertSame('SET DEFAULT', $constraint->getUpdateRule()); $this->assertSame('SET DEFAULT', $constraint->getDeleteRule()); $constraint = new ForeignKey('name', 'column', 'parent_table', 'column', 'SET NULL', 'SET NULL'); $this->assertSame('SET NULL', $constraint->getUpdateRule()); $this->assertSame('SET NULL', $constraint->getDeleteRule()); }