/** * Tests the getChangeSequenceSQL method. * * @return void * * @since 12.1 */ public function testGetChangeSequenceSQL() { $instance = new JDatabaseImporterPostgresqlInspector(); $instance->setDbo($this->dbo); $this->assertThat($instance->getChangeSequenceSQL(new SimpleXmlElement($this->sample['xml-id-seq'])), $this->equalTo('ALTER SEQUENCE jos_dbtest_id_seq INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 OWNED BY "public.jos_dbtest.id"'), 'getChangeSequenceSQL did not yield the expected result.'); }
/** * Tests the getChangeSequenceSQL method. * * @return void * * @since 12.1 */ public function testGetChangeSequenceSQL() { $xmlIdSeq = '<sequence Name="jos_dbtest_id_seq" Schema="public" Table="jos_dbtest" Column="id" ' . 'Type="bigint" Start_Value="1" Min_Value="1" Max_Value="9223372036854775807" Increment="1" Cycle_option="NO" /> '; $instance = new JDatabaseImporterPostgresqlInspector; $instance->setDbo($this->dbo); $this->assertThat( $instance->getChangeSequenceSQL( new SimpleXmlElement($xmlIdSeq) ), $this->equalTo( 'ALTER SEQUENCE jos_dbtest_id_seq INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 OWNED BY "public.jos_dbtest.id"' ), 'getChangeSequenceSQL did not yield the expected result.' ); }