Skip to content

Commit

Permalink
Merge pull request joomla#4710 from nibra/test-annotations
Browse files Browse the repository at this point in the history
Test annotations
  • Loading branch information
mbabker committed Oct 16, 2014
2 parents 9e29f97 + 5c1bcaf commit 4915bca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 34 deletions.
41 changes: 10 additions & 31 deletions tests/unit/suites/libraries/cms/schema/JSchemaChangesetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,56 +73,35 @@ protected function tearDown()
parent::tearDown();
}

/**
* Tests the __construct method
*
* @return void
*
* @since 3.0
*/
public function test__construct()
public function dataDriver()
{
$this->assertThat(
new JSchemaChangeset($this->db, null),
$this->isInstanceOf('JSchemaChangeset')
return array(
array('mysqli'),
array('postgresql'),
array('sqlsrv'),
);
}

/**
* Tests the __construct method with the PostgreSQL driver
* Tests the __construct method with the given driver
*
* @return void
*
* @since 3.0
*/
public function test__constructPostgresql()
{
$this->db->name = 'postgresql';

$this->assertThat(
new JSchemaChangeset($this->db, null),
$this->isInstanceOf('JSchemaChangeset')
);
}

/**
* Tests the __construct method with the SQL Server driver
* @medium
*
* @dataProvider dataDriver
* @return void
*
* @since 3.0
*/
public function test__constructSqlsrv()
public function test__construct($driver)
{
$this->db->name = 'sqlsrv';
$this->db->name = $driver;

$this->assertThat(
new JSchemaChangeset($this->db, null),
$this->isInstanceOf('JSchemaChangeset')
);
}


/**
* Tests the getInstance method with the MySQL driver
*
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/suites/libraries/joomla/JFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ public function testGetDateUnchanged()
/**
* Tests the JFactory::getDate method.
*
* @medium
*
* @return void
*
* @since 12.3
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/suites/libraries/joomla/cache/JCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ public function testClean()
/**
* Testing Gc().
*
* @medium
*
* @return void
*/
public function testGc()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ public function testCacheMiss($store)
}

/**
* Test...
*
* @param string $store The store.
* @medium
*
* @dataProvider provider
*
* @param string $store The store.
*
* @return void
*/
public function testCacheTimeout($store)
Expand Down

0 comments on commit 4915bca

Please sign in to comment.