Skip to content

Instantly share code, notes, and snippets.

@pcave
Created October 10, 2014 19:54
Show Gist options
  • Save pcave/5a7ab2adcc59829e6c72 to your computer and use it in GitHub Desktop.
Save pcave/5a7ab2adcc59829e6c72 to your computer and use it in GitHub Desktop.
UpdatePathTestCase attempt
<?php
class SpringboardSocialUpdradePathTestCase extends UpdatePathTestCase {
public static function getInfo() {
return array(
'name' => 'Springboard Social update path',
'description' => 'Tests update from 4.4 to 4.5.',
'group' => 'Update path',
);
}
public function setUp() {
$this->databaseDumpFiles = array(
drupal_get_path('module', 'sb_social') . '/tests/update/sb-44.database.php',
);
parent::setUp();
}
public function testSpringboardSocialUpdate() {
$shares = db_query("SELECT * from {sb_social_submissions}");
$this->assertEqual(7, $shares->rowCount(), '7 share records found in database.');
$this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
$shares = db_query("SELECT * from {sb_social_submissions}");
$this->assertEqual(7, $shares->rowCount(), '7 share records found in database.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment