Skip to content

Commit

Permalink
Merge pull request #21 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
mtompset authored Mar 17, 2020
2 parents 48254bd + a55e574 commit ad09e5e
Show file tree
Hide file tree
Showing 10 changed files with 725 additions and 2,239 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: php
php:
- "5.6"
- "7.0"
- "7.1"
- "7.2"

before_script:
- curl -s https://getcomposer.org/installer | php && php composer.phar update
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
cd /var/lib/GA_mock/SilMock/tests; /var/lib/GA_mock/SilMock/tests/phpunit
21 changes: 7 additions & 14 deletions SilMock/tests/Google/Service/DirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use SilMock\Google\Service\GoogleFixtures;


class DirectoryTest extends PHPUnit_Framework_TestCase
class DirectoryTest extends PHPUnit\Framework\TestCase
{
public $dataFile = DATAFILE2;

Expand Down Expand Up @@ -494,10 +494,6 @@ public function testUsersUpdate_WithDifferentAliases()
$this->assertEquals($expected, $results, $msg);
}

/**
* @expectedException \Exception
* @expectedExceptionCode 201407101130
*/
public function testUsersUpdate_NotThere()
{
$fixturesClass = new GoogleFixtures($this->dataFile);
Expand All @@ -521,6 +517,8 @@ public function testUsersUpdate_NotThere()
ObjectUtils::initialize($newUser, $userData);

$newDir = new Directory('anyclient', $this->dataFile);

$this->expectExceptionCode(201407101130);
$newDir->users->update($userId, $newUser);
// the assert is in the doc comment
}
Expand Down Expand Up @@ -633,10 +631,6 @@ public function testUsersAliasesInsert()
$this->assertEquals($expected, $results, $msg);
}

/**
* @expectedException \Exception
* @expectedExceptionCode 201407110830
*/
public function testUsersAliasesInsert_UserNotThere()
{
$fixturesClass = new GoogleFixtures($this->dataFile);
Expand All @@ -650,8 +644,9 @@ public function testUsersAliasesInsert_UserNotThere()
$newAlias->kind = "personal";

$newDir = new Directory('anyclient', $this->dataFile);

$this->expectExceptionCode(201407110830);
$newAlias = $newDir->users_aliases->insert("[email protected]", $newAlias);
// the assert is in the doc comments with @expectedException
}

public function testUsersAliasesListUsersAliases_Email()
Expand Down Expand Up @@ -768,10 +763,6 @@ public function testUsersAliasesListUsersAliases_Structure()
$this->assertEquals($expected, $results, $msg);
}

/**
* @expectedException \Exception
* @expectedExceptionCode 201407101420
*/
public function testUsersAliasesListUsersAliases_UserNotThere()
{
$fixturesClass = new GoogleFixtures($this->dataFile);
Expand All @@ -787,6 +778,8 @@ public function testUsersAliasesListUsersAliases_UserNotThere()
$fixturesClass->addFixtures($newFixtures);

$newDir = new Directory('anyclient', $this->dataFile);

$this->expectExceptionCode(201407101420);
$aliases = $newDir->users_aliases->listUsersAliases("[email protected]");
}

Expand Down
2 changes: 1 addition & 1 deletion SilMock/tests/Google/Service/GoogleFixturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilMock\Google\Service\GoogleFixtures;
use SilMock\DataStore\Sqlite\SqliteUtils;

class GoogleFixturesTest extends PHPUnit_Framework_TestCase
class GoogleFixturesTest extends PHPUnit\Framework\TestCase
{
public $dataFile = DATAFILE3;

Expand Down
2 changes: 1 addition & 1 deletion SilMock/tests/Sqlite/SqliteUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use SilMock\DataStore\Sqlite\SqliteUtils;

class SqliteUtilsTest extends PHPUnit_Framework_TestCase
class SqliteUtilsTest extends PHPUnit\Framework\TestCase
{
public $dataFile = DATAFILE1;

Expand Down
Empty file modified SilMock/tests/phpunit
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "fillup/centos-6.5-x86_64-minimal"
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |v|
v.memory = 1536
end

# Create a private network, which allows host-only access to the machine
# using a specific IP.
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
},
{
"name": "Matt Henderson"
},
{
"name": "Mark Tompsett"
}
],
"require": {
"php": ">=5.3.3",
"php": ">=7.2.0",
"ext-json": "*",
"google/apiclient": "^1.1",
"google/apiclient-services": "^0.83",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"apigen/apigen": "*",
"satooshi/php-coveralls": "*"
"phpunit/phpunit": "8.5.*"
},
"autoload": {
"psr-0": {
Expand Down
Loading

0 comments on commit ad09e5e

Please sign in to comment.