GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
sqlmarker
Browse code
Added empty fixture for Staff table only.
master
1 parent
8d31344
commit
5306f304350cd11410dc941363b50646cc2d287c
Nigel Stanger
authored
on 28 Jun 2013
Patch
Showing
2 changed files
Unit_testing/BDL_Fixture_Staff_Empty.xml
Unit_testing/BDL_Test_Staff_structure.php
Ignore Space
Show notes
View
Unit_testing/BDL_Fixture_Staff_Empty.xml
0 → 100644
<dataset> <table name="staff"> <column>staff_id</column> <column>surname</column> <column>firstnames</column> <column>phone</column> <column>address</column> <column>department</column> <column>position</column> <column>salary</column> <column>comments</column> </table> </dataset>
Ignore Space
Show notes
View
Unit_testing/BDL_Test_Staff_structure.php
<?php require_once "BDL_Test_Staff.php"; /** * @backupGlobals disabled * @backupStaticAttributes disabled */ class BDL_Test_Staff_structure extends BDL_Test_Staff { /** * Return fixture data set for current database connection. * * @access protected * @return PHPUnit_Extensions_Database_DataSet_IDataSet * @todo Parameterise the fixture filename. */ protected function getDataSet() { return $this->createXMLDataSet("BDL_Fixture_Staff_Empty.xml"); } public function testTableExists() { $this->assertTableExists(); } /** * @dataProvider provideColumnNames */ public function testColumnExists( $columnName ) { $this->assertColumnExists( $columnName ); } /** * @dataProvider provideColumnTypes */ public function testColumnDataType( $columnName, $columnTypeList ) { $this->assertColumnDataType( $columnName, $columnTypeList ); } /** * @dataProvider provideColumnLengths */ public function testColumnLength( $columnName, $columnType, $minLength, $maxLength, $numDecimals ) { $this->assertColumnLength( $columnName, $columnType, $minLength, $maxLength, $numDecimals ); } /** * @dataProvider provideColumnNullabilities */ public function testColumnNullability( $columnName, $columnNullability ) { $this->assertColumnNullability( $columnName, $columnNullability ); } public function testPKExists() { return $this->assertPKExists(); } /** * @depends testPKExists */ public function testPKColumns( $constraintName ) { $this->assertPKColumns( $constraintName ); } /** * @dataProvider provideConstraintNames */ public function testConstraintsNamed( $constraintName, $constraintType ) { $this->assertConstraintNamed( $constraintName, $constraintType ); } } ?>
<?php require_once "BDL_Test_Staff.php"; /** * @backupGlobals disabled * @backupStaticAttributes disabled */ class BDL_Test_Staff_structure extends BDL_Test_Staff { /** * Return fixture data set for current database connection. * * @access protected * @return PHPUnit_Extensions_Database_DataSet_IDataSet * @todo Parameterise the fixture filename. */ protected function getDataSet() { return $this->createXMLDataSet("BDL_Fixture_Empty.xml"); } public function testTableExists() { $this->assertTableExists(); } /** * @dataProvider provideColumnNames */ public function testColumnExists( $columnName ) { $this->assertColumnExists( $columnName ); } /** * @dataProvider provideColumnTypes */ public function testColumnDataType( $columnName, $columnTypeList ) { $this->assertColumnDataType( $columnName, $columnTypeList ); } /** * @dataProvider provideColumnLengths */ public function testColumnLength( $columnName, $columnType, $minLength, $maxLength, $numDecimals ) { $this->assertColumnLength( $columnName, $columnType, $minLength, $maxLength, $numDecimals ); } /** * @dataProvider provideColumnNullabilities */ public function testColumnNullability( $columnName, $columnNullability ) { $this->assertColumnNullability( $columnName, $columnNullability ); } public function testPKExists() { return $this->assertPKExists(); } /** * @depends testPKExists */ public function testPKColumns( $constraintName ) { $this->assertPKColumns( $constraintName ); } /** * @dataProvider provideConstraintNames */ public function testConstraintsNamed( $constraintName, $constraintType ) { $this->assertConstraintNamed( $constraintName, $constraintType ); } } ?>
Show line notes below