/** * Tests the getAddSequenceSQL method. * * @return void * * @since 12.1 */ public function testGetAddSequenceSQL() { $instance = new JDatabaseImporterPostgresqlInspector(); $instance->setDbo($this->dbo); $this->assertThat($instance->getAddSequenceSQL(new SimpleXmlElement($this->sample['xml-id-seq'])), $this->equalTo('CREATE SEQUENCE jos_dbtest_id_seq INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 NO CYCLE OWNED BY "public.jos_dbtest.id"'), 'getAddSequenceSQL did not yield the expected result.'); }
/** * Tests the getAddSequenceSQL method. * * @return void * * @since 12.1 */ public function testGetAddSequenceSQL() { $instance = new JDatabaseImporterPostgresqlInspector; $instance->setDbo($this->dbo); $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" /> '; $this->assertThat( $instance->getAddSequenceSQL( new SimpleXmlElement($xmlIdSeq) ), $this->equalTo( 'CREATE SEQUENCE jos_dbtest_id_seq INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 NO CYCLE OWNED BY "public.jos_dbtest.id"' ), 'getAddSequenceSQL did not yield the expected result.' ); }