Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#224 issue Remove $that = $this #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions tests/phpunit/MergePluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testSubscribedEvents()
*/
public function testOneMergeNoConflicts()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -165,7 +165,7 @@ function ($args) use ($that) {
*/
public function testMergeWithReplace()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -201,7 +201,7 @@ function ($args) use ($that) {
*/
public function testMergeWithIgnore()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -238,7 +238,7 @@ function ($args) use ($that) {
*/
public function testMergeWithIgnoreAndReplace()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -377,7 +377,7 @@ function ($args) use (&$packages) {
*/
public function testRecursivePathRepositoriesWithSubDirectory()
{
$that = $this;

$io = $this->io;
$dir = $this->fixtureDir(__FUNCTION__);

Expand Down Expand Up @@ -532,7 +532,7 @@ function ($args) use (&$packages) {
*/
public function testOneMergeWithConflicts($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -576,7 +576,7 @@ function ($args) use ($that) {
*/
public function testMergedRepositories()
{
$that = $this;

$io = $this->io;
$dir = $this->fixtureDir(__FUNCTION__);

Expand Down Expand Up @@ -668,7 +668,7 @@ function ($args) use ($that) {
*/
public function testPrependRepositories()
{
$that = $this;

$io = $this->io;
$dir = $this->fixtureDir(__FUNCTION__);

Expand Down Expand Up @@ -766,7 +766,7 @@ function ($args) use ($that) {
*/
public function testUpdateStabilityFlags($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -815,7 +815,7 @@ function ($args) use ($that, &$expects) {

public function testAliases()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -849,7 +849,7 @@ function ($args) use ($that) {

public function testMergedAutoload()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -935,7 +935,7 @@ function ($args) use ($that) {
*/
public function testMergeExtra($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -967,7 +967,7 @@ function ($args) use ($that) {
*/
public function testMergeExtraConflict()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1000,7 +1000,7 @@ function ($args) use ($that) {
*/
public function testMergeExtraConflictReplace()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1036,7 +1036,7 @@ function ($args) use ($that) {
*/
public function testMergeExtraDeep($suffix, $replace)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__ . $suffix);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1098,7 +1098,7 @@ public function provideDeepMerge()
*/
public function testMergeScripts($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1130,7 +1130,7 @@ function ($args) use ($that) {
*/
public function testMergeScriptsConflict()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1165,7 +1165,7 @@ function ($args) use ($that) {
*/
public function testMergeScriptsConflictReplace()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1350,7 +1350,7 @@ function () use ($repoManager) {
*/
public function testCorrectMergeOrderOfSpecifiedFilesAndGlobFiles()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -1379,7 +1379,7 @@ function ($args) use ($that, &$expects) {
*/
public function testSelfVersion()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -1422,7 +1422,7 @@ function ($args) use ($that) {
*/
public function testSelfVersionNoRootVersion($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -1470,7 +1470,7 @@ function ($args) use ($that) {
*/
public function testMergedStabilityFlagsRespectsMinimumStability()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -1510,7 +1510,7 @@ function ($args) use ($that, &$expects) {
*/
public function testMergeDevFalse()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand Down Expand Up @@ -1542,7 +1542,7 @@ public function testMissingRequireThrowsException()

public function testRequire()
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);

$root = $this->rootFromJson("{$dir}/composer.json");
Expand All @@ -1564,7 +1564,7 @@ function ($args) use ($that) {
*/
public function testVersionConstraintWithRevision($fireInit)
{
$that = $this;

$dir = $this->fixtureDir(__FUNCTION__);
$root = $this->rootFromJson("{$dir}/composer.json");

Expand Down Expand Up @@ -1693,7 +1693,7 @@ protected function fixtureDir($subdir)
*/
protected function rootFromJson($file)
{
$that = $this;

$json = json_decode(file_get_contents($file), true);

$data = array_merge(
Expand Down