Skip to content

Commit

Permalink
Merge pull request phalcon#800 from sergeyklay/3.2.x
Browse files Browse the repository at this point in the history
Use latest stable Phalcon
  • Loading branch information
sergeyklay authored Jul 10, 2017
2 parents e36c4db + 9f155e6 commit d532e31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 99 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ env:
- ZEND_DONT_UNLOAD_MODULES=1
- CC="ccache gcc"
- PATH="$PATH:~/bin"
- PHALCON_VERSION="v3.2.0"
- PHALCON_VERSION="v3.2.1"

before_install:
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1)"
Expand Down
98 changes: 0 additions & 98 deletions tests/unit/Mvc/Model/EagerLoading/EagerLoadingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ protected function _after()
*/
public function testShouldLoadChildOfEmptyParentWithoutException()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

// Has many -> Belongs to
// Should be the same for Has many -> Has one
$loader = new Loader(Robot::findFirstById(1), 'Bugs.Robot');
Expand All @@ -111,17 +100,6 @@ public function testShouldLoadChildOfEmptyParentWithoutException()

public function testManyEagerLoadsAndConstraints()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$manufacturers = Manufacturer::with(
[
'Robots' => function ($builder) {
Expand Down Expand Up @@ -219,17 +197,6 @@ public function testShouldThrowInvalidArgumentExceptionIfLoaderSubjectIsNotValid
*/
public function testShouldThrowLogicExceptionIfTheEntityWillBeIncomplete($method, $args)
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

call_user_func_array(['Phalcon\Test\Mvc\Model\EagerLoading\Stubs\Robot', $method], $args);
}

Expand All @@ -245,34 +212,13 @@ public function testShouldThrowBadMethodCallExceptionIfArgumentsWereNotProvided(

public function testShouldUseEagerLoadingAndGetModelByUsingMethods()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$this->assertTrue(is_array(Robot::with('Parts')));
$this->assertTrue(is_object(Robot::findFirstById(1)->load('Parts')));
$this->assertTrue(is_object(Robot::findFirstWith('Parts', ['id = 1'])));
}

public function testShouldUseEagerLoadingAndDetectHasManyToMany()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}
$rawly = Robot::findFirstById(1);
$rawly->parts;

Expand Down Expand Up @@ -302,17 +248,6 @@ public function testShouldUseEagerLoadingAndDetectHasManyToMany()

public function testShouldUseEagerLoadingAndDetectHasMany()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$rawly = Manufacturer::findFirstById(1);
$rawly->robots;

Expand Down Expand Up @@ -342,17 +277,6 @@ public function testShouldUseEagerLoadingAndDetectHasMany()

public function testShouldUseEagerLoadingAndDetectHasOne()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$rawly = Robot::findFirstById(1);
$rawly->purpose;

Expand All @@ -365,17 +289,6 @@ public function testShouldUseEagerLoadingAndDetectHasOne()

public function testShouldUseEagerLoadingAndDetectBelongsToDeep()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$rawly = Manufacturer::findFirstById(1);
$rawly->robots = $this->resultSetToEagerLoadingEquivalent($rawly->robots);

Expand All @@ -398,17 +311,6 @@ public function testShouldUseEagerLoadingAndDetectBelongsToDeep()

public function testBelongsTo()
{
if (version_compare(PHP_VERSION, '5.6.0', '<') &&
version_compare(Version::get(), '3.2.0', '=')
) {
$this->markTestSkipped(
'The Phalcon\Mvc\Model\Query\Builder was changed in Phalcon v3.2.0.' . PHP_EOL .
'These changes do not allow to correctly run tests in PHP 5.5.' . PHP_EOL .
'See https://github.com/phalcon/cphalcon/pull/12905/commits/8052204db745e93aacfc38c1b6651e29b7ba9440' . PHP_EOL .
'And https://travis-ci.org/phalcon/incubator/jobs/244703920'
);
}

$rawly = Bug::findFirstById(1);
$rawly->robot;

Expand Down

0 comments on commit d532e31

Please sign in to comment.