Skip to content

Commit

Permalink
Merge pull request cweagans#267 from cweagans/remove-dependency-patch…
Browse files Browse the repository at this point in the history
…-resolution

Remove dependency patch resolution
  • Loading branch information
cweagans authored Apr 10, 2019
2 parents fc8a477 + c32d533 commit 4ebb103
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 179 deletions.
2 changes: 0 additions & 2 deletions src/Capability/CoreResolverProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace cweagans\Composer\Capability;

use cweagans\Composer\Resolvers\DependencyPatches;
use cweagans\Composer\Resolvers\PatchesFile;
use cweagans\Composer\Resolvers\RootComposer;

Expand All @@ -16,7 +15,6 @@ public function getResolvers()
return [
new RootComposer($this->composer, $this->io),
new PatchesFile($this->composer, $this->io),
new DependencyPatches($this->composer, $this->io),
];
}
}
68 changes: 0 additions & 68 deletions src/Resolvers/DependencyPatches.php

This file was deleted.

77 changes: 69 additions & 8 deletions tests/_support/_generated/UnitTesterActions.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?php //[STAMP] 5648e2ecd2668319703f108f1329e8a8
<?php //[STAMP] 5e4c7302c0b63a4df799dc88da465f39
namespace _generated;

// This class was automatically generated by build task
// You should not change it manually as it will be overwritten on next build
// @codingStandardsIgnoreFile

use Codeception\Module\Asserts;
use Helper\Unit;

trait UnitTesterActions
{
/**
Expand All @@ -26,13 +23,13 @@ abstract protected function getScenario();
* Regular example:
* ```php
* <?php
* $I->assertEquals($element->getChildrenCount(), 5);
* $I->assertEquals(5, $element->getChildrenCount());
* ```
*
* Floating-point example:
* ```php
* <?php
* $I->assertEquals($calculator->add(0.1, 0.2), 0.3, 'Calculator should add the two numbers correctly.', 0.01);
* $I->assertEquals(0.3, $calculator->add(0.1, 0.2), 'Calculator should add the two numbers correctly.', 0.01);
* ```
*
* @param $expected
Expand All @@ -56,13 +53,13 @@ public function assertEquals($expected, $actual, $message = null, $delta = null)
* Regular example:
* ```php
* <?php
* $I->assertNotEquals($element->getChildrenCount(), 0);
* $I->assertNotEquals(0, $element->getChildrenCount());
* ```
*
* Floating-point example:
* ```php
* <?php
* $I->assertNotEquals($calculator->add(0.1, 0.2), 0.4, 'Calculator should add the two numbers correctly.', 0.01);
* $I->assertNotEquals(0.4, $calculator->add(0.1, 0.2), 'Calculator should add the two numbers correctly.', 0.01);
* ```
*
* @param $expected
Expand Down Expand Up @@ -326,6 +323,20 @@ public function assertTrue($condition, $message = null) {
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that the condition is NOT true (everything but true)
*
* @param $condition
* @param string $message
* @see \Codeception\Module\Asserts::assertNotTrue()
*/
public function assertNotTrue($condition, $message = null) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args()));
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
Expand All @@ -340,6 +351,20 @@ public function assertFalse($condition, $message = null) {
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Checks that the condition is NOT false (everything but false)
*
* @param $condition
* @param string $message
* @see \Codeception\Module\Asserts::assertNotFalse()
*/
public function assertNotFalse($condition, $message = null) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args()));
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
Expand Down Expand Up @@ -540,9 +565,45 @@ public function fail($message) {
*
* @param $exception string or \Exception
* @param $callback
*
* @deprecated Use expectThrowable instead
* @see \Codeception\Module\Asserts::expectException()
*/
public function expectException($exception, $callback) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Handles and checks throwables (Exceptions/Errors) called inside the callback function.
* Either throwable class name or throwable instance should be provided.
*
* ```php
* <?php
* $I->expectThrowable(MyThrowable::class, function() {
* $this->doSomethingBad();
* });
*
* $I->expectThrowable(new MyException(), function() {
* $this->doSomethingBad();
* });
* ```
* If you want to check message or throwable code, you can pass them with throwable instance:
* ```php
* <?php
* // will check that throwable MyError is thrown with "Don't do bad things" message
* $I->expectThrowable(new MyError("Don't do bad things"), function() {
* $this->doSomethingBad();
* });
* ```
*
* @param $throwable string or \Throwable
* @param $callback
* @see \Codeception\Module\Asserts::expectThrowable()
*/
public function expectThrowable($throwable, $callback) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args()));
}
}
6 changes: 0 additions & 6 deletions tests/acceptance/ApplyPatchFromDependencyCept.php

This file was deleted.

6 changes: 0 additions & 6 deletions tests/acceptance/DontApplyPatchFromDependencyCept.php

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
3 changes: 1 addition & 2 deletions tests/unit/CoreResolverProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public function testGetResolvers()

$resolvers = $resolverProvider->getResolvers();

$this->assertCount(3, $resolvers);
$this->assertCount(2, $resolvers);
$this->assertInstanceOf(\cweagans\Composer\Resolvers\RootComposer::class, $resolvers[0]);
$this->assertInstanceOf(\cweagans\Composer\Resolvers\PatchesFile::class, $resolvers[1]);
$this->assertInstanceOf(\cweagans\Composer\Resolvers\DependencyPatches::class, $resolvers[2]);
}
}
42 changes: 0 additions & 42 deletions tests/unit/DependencyPatchesResolverTest.php

This file was deleted.

0 comments on commit 4ebb103

Please sign in to comment.