Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 11 09:24
    jinjie closed #237
  • May 11 09:24
    jinjie commented #237
  • May 11 08:29
    dhensby commented #237
  • May 11 08:08
    jinjie opened #237
  • Apr 05 07:58
    kinglozzer deleted #211
  • Apr 04 12:10
    kinglozzer commented #211
  • Apr 04 12:05
    tahlialouisa deleted #236
  • Mar 30 10:10
    kinglozzer edited #236
  • Mar 28 16:16
    kinglozzer commented #211
  • Mar 28 16:15
    kinglozzer commented #236
  • Mar 28 16:05
    kinglozzer opened #236
  • Nov 04 2021 12:45
    kinglozzer closed #63
  • Nov 04 2021 12:43
    kinglozzer closed #171
  • Nov 04 2021 12:43
    kinglozzer commented #171
  • Nov 04 2021 12:41
    kinglozzer closed #233
  • Nov 04 2021 12:41
    kinglozzer commented #233
  • Nov 04 2021 12:37

    kinglozzer on 3

    Fix travis builds Merge pull request #235 from bi… (compare)

  • Nov 04 2021 12:37
    kinglozzer closed #235
  • Nov 04 2021 10:59
    kinglozzer synchronize #235
  • Nov 04 2021 10:10
    kinglozzer synchronize #235
Morven Lewis-Everley
@mlewis-everley
OK, it appears to be
in this instance?
Roman Schmid
@bummzack
pretty much, yes
Morven Lewis-Everley
@mlewis-everley
(I am guessing all Omnipay gateways expose similar paramaters)
OK, cool
Roman Schmid
@bummzack
they do
i think testMode is pretty much everywhere
Morven Lewis-Everley
@mlewis-everley
OK, I have added what I have done so far to a pull request
silverstripe/silverstripe-omnipay#177
and referenced it in the issue you flagged yesterday @bummzack
Don't really know if it is what you were thinking, but I have managed to get get it to work with Barclays pretty easily
I am not sure how much more I can do with it for now, without the risk of going postal!
Morven Lewis-Everley
@mlewis-everley
I am still getting the error ERROR [User Error]: Uncaught Error: Call to undefined method Mock_PxPayCompleteAuthorizeRequest_d2899b8d::send()
when I try and run unit tests
I notice that under require-dev you include "omnipay/paymentexpress": "~2.1"
does payment express need configuring at all?
Roman Schmid
@bummzack
no
Including actual gateways in the tests is a bit of a legacy code thing… ideally we would move everything to mock based tests
you'd have to require --dev the omnipay dev dependencies as well in your project
dev requirements aren't automatically installed from third party packages
Morven Lewis-Everley
@mlewis-everley
Oh hang on
I think I just realised something
I may have done something stupid!
Morven Lewis-Everley
@mlewis-everley
I am still getting the same error trying to run phpunit
I have just done a fresh install
phpunit works on unit tests I have written
but most of them aren't particularly complicated
out of curiosity @bummzack what version of phpunit are you using? And could you paste up your phpunit.xml?
Roman Schmid
@bummzack
phpunit 3.7.38
Morven Lewis-Everley
@mlewis-everley
OK, that is the same as mine
Roman Schmid
@bummzack
My phpunit file looks like this… nothing special, I think the main thing is the bootstrap attribute.
<phpunit bootstrap="framework/tests/bootstrap.php" colors="true">
    <testsuite name="Default">
        <directory>mysite/tests</directory>
        <directory>cms/tests</directory>
        <directory>framework/tests</directory>
    </testsuite>

    <testsuite name="Framework">
        <directory>framework/tests</directory>
    </testsuite>

    <testsuite name="CMS">
        <directory>cms/tests</directory>
    </testsuite>

    <testsuite name="Silvershop">
        <directory>silvershop/tests</directory>
    </testsuite>

    <listeners>
        <listener class="SS_TestListener" file="framework/dev/TestListener.php" />
    </listeners>

    <groups>
        <exclude>
            <group>sanitychecks</group>
        </exclude>
    </groups>

    <php>
        <request name="db" value="sqlite3"/>
    </php>
</phpunit>
sorry, pasted twice somehow…
do you have these in your require-dev?
"require-dev": {
  "phpunit/PHPUnit": "~3.7",
  "silverstripe/sqlite3": "^1.4",
  "omnipay/dummy": "~2.1",
  "omnipay/paymentexpress": "~2.1",
  "omnipay/paypal": "^2.5",
  "guzzle/guzzle": "^3.9",
  "omnipay/tests": "^2.0",
  "omnipay/common": "~2.5"
},
Morven Lewis-Everley
@mlewis-everley
Hmm, not all those
just updating
Ugh, finally!
looks like it is working now
Roman Schmid
@bummzack
awesome
Morven Lewis-Everley
@mlewis-everley
I think it was the paymentexpress module
Roman Schmid
@bummzack
yeah… when testing modules this way (eg. when they are imported as a dependency) you'd have to add their dev-dependencies to your main composer file
because composer doesn't install these… I'm not sure if there's a flag for this though. Probably :)
Morven Lewis-Everley
@mlewis-everley
that is annoying
I usually just use composer require or composer update on local/dev, then composer install --no-dev on live
Roman Schmid
@bummzack
yeah, but even if you install regularly, it will only install dev requirements of your main composer file
Morven Lewis-Everley
@mlewis-everley
I had never realised that
I did try running composer update --dev but that didn't seem to work
Roman Schmid
@bummzack
no it wont. the dev requirements are only relevant to the library itself, not the global project
I guess that's the reasoning behind that…
no need to install all dev dependencies of all required modules