Skip to content

Commit

Permalink
REFACTOR replace options with variations in tests (#16)
Browse files Browse the repository at this point in the history
* update Foxy version
  • Loading branch information
jsirish authored Jul 18, 2020
1 parent 3d2eef5 commit b1b5380
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"dynamic/silverstripe-foxy": "^1.0"
"dynamic/silverstripe-foxy": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
Expand Down
12 changes: 12 additions & 0 deletions tests/Foxy/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Dynamic\Foxy\Parser\Tests\Foxy;

use Dynamic\Foxy\Inventory\Test\TestOnly\Page\TestProduct;
use Dynamic\Foxy\Model\FoxyHelper;
use Dynamic\Foxy\Model\Variation;
use Dynamic\Foxy\Parser\Foxy\Transaction;
use Dynamic\Foxy\Parser\Tests\Controller\DataTestController;
use Dynamic\Foxy\Parser\Tests\FoxyXMLFeedFactory;
Expand Down Expand Up @@ -30,6 +32,16 @@ class TransactionTest extends FunctionalTest
FoxyFeedTestProduct::class,
];

/**
*
*/
protected function setUp()
{
parent::setUp();

Config::modify()->set(Variation::class, 'has_one', ['Product' => FoxyFeedTestProduct::class]);
}

/**
* @throws \SilverStripe\Security\PasswordEncryptor_NotFoundException
*/
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Dynamic\Foxy\Model\ProductOption:
red:
Title: Red
blue:
Title: Blue
#Dynamic\Foxy\Model\Variation:
# red:
# Title: Red
# blue:
# Title: Blue

Dynamic\Foxy\Parser\Tests\Product\FoxyFeedTestProduct:
one:
Expand Down

0 comments on commit b1b5380

Please sign in to comment.