/home/desid573/public_html/app/braintree/tests/integration
NameSizeModeActions
Error/-0755rm
Result/-0755rm
AddOnsTest.php29530644editdlrm
AddressTest.php128330644editdlrm
ApplePayTest.php25950644editdlrm
ClientTokenTest.php70160644editdlrm
CreditCardTest.php564890644editdlrm
CreditCardVerificationAdvancedSearchTest.php112090644editdlrm
CreditCardVerificationTest.php22660644editdlrm
CustomerAdvancedSearchTest.php76690644editdlrm
CustomerTest.php706950644editdlrm
DisbursementTest.php12060644editdlrm
DiscountTest.php30720644editdlrm
DisputeSearchTest.php37070644editdlrm
DisputeTest.php155170644editdlrm
DocumentUploadTest.php41850644editdlrm
GraphQLTest.php27850644editdlrm
HttpClientApi.php41700644editdlrm
HttpTest.php62380644editdlrm
IdealPaymentTest.php41410644editdlrm
MasterpassCardTest.php60220644editdlrm
MerchantAccountTest.php300400644editdlrm
MerchantTest.php101600644editdlrm
MultipleValueNodeTest.php33390644editdlrm
OAuthTest.php137320644editdlrm
PaymentMethodNonceTest.php79650644editdlrm
PaymentMethodTest.php696180644editdlrm
PaymentMethodWithUsBankAccountTest.php64830644editdlrm
PayPalAccountTest.php113000644editdlrm
PlanTest.php47570644editdlrm
SamsungPayCardTest.php87580644editdlrm
SettlementBatchSummaryTest.php34970644editdlrm
SubscriptionHelper.php24600644editdlrm
SubscriptionSearchTest.php178430644editdlrm
SubscriptionTest.php553940644editdlrm
TestTransactionTest.php28890644editdlrm
TextNodeTest.php53790644editdlrm
TransactionAdvancedSearchTest.php657420644editdlrm
TransactionLineItemTest.php14010644editdlrm
TransactionTest.php2413430644editdlrm
TransactionWithUsBankAccountTest.php118920644editdlrm
TransparentRedirectTest.php124570644editdlrm
UsBankAccountTest.php46910644editdlrm
UsBankAccountVerificationTest.php98960644editdlrm
VisaCheckoutCardTest.php70770644editdlrm
Edit: /home/desid573/public_html/app/braintree/tests/integration/PlanTest.php (4757B)
assertEquals($plans, []); self::integrationMerchantConfig(); } public function testAll_returnsAllPlans() { $newId = strval(rand()); $params = [ "id" => $newId, "billingDayOfMonth" => "1", "billingFrequency" => "1", "currencyIsoCode" => "USD", "description" => "some description", "name" => "php test plan", "numberOfBillingCycles" => "1", "price" => "1.00", "trialPeriod" => "false" ]; $http = new Braintree\Http(Braintree\Configuration::$global); $path = Braintree\Configuration::$global->merchantPath() . '/plans/create_plan_for_tests'; $http->post($path, ["plan" => $params]); $addOnParams = [ "kind" => "add_on", "plan_id" => $newId, "amount" => "1.00", "name" => "add_on_name" ]; $http = new Braintree\Http(Braintree\Configuration::$global); $path = Braintree\Configuration::$global->merchantPath() . '/modifications/create_modification_for_tests'; $http->post($path, ['modification' => $addOnParams]); $discountParams = [ "kind" => "discount", "plan_id" => $newId, "amount" => "1.00", "name" => "discount_name" ]; $http = new Braintree\Http(Braintree\Configuration::$global); $path = Braintree\Configuration::$global->merchantPath() . '/modifications/create_modification_for_tests'; $http->post($path, ["modification" => $discountParams]); $plans = Braintree\Plan::all(); foreach ($plans as $plan) { if ($plan->id == $newId) { $actualPlan = $plan; } } $this->assertNotNull($actualPlan); $this->assertEquals($params["billingDayOfMonth"], $actualPlan->billingDayOfMonth); $this->assertEquals($params["billingFrequency"], $actualPlan->billingFrequency); $this->assertEquals($params["currencyIsoCode"], $actualPlan->currencyIsoCode); $this->assertEquals($params["description"], $actualPlan->description); $this->assertEquals($params["name"], $actualPlan->name); $this->assertEquals($params["numberOfBillingCycles"], $actualPlan->numberOfBillingCycles); $this->assertEquals($params["price"], $actualPlan->price); $addOn = $actualPlan->addOns[0]; $this->assertEquals($addOnParams["name"], $addOn->name); $discount = $actualPlan->discounts[0]; $this->assertEquals($discountParams["name"], $discount->name); } public function testGatewayAll_returnsAllPlans() { $newId = strval(rand()); $params = [ "id" => $newId, "billingDayOfMonth" => "1", "billingFrequency" => "1", "currencyIsoCode" => "USD", "description" => "some description", "name" => "php test plan", "numberOfBillingCycles" => "1", "price" => "1.00", "trialPeriod" => "false" ]; $http = new Braintree\Http(Braintree\Configuration::$global); $path = Braintree\Configuration::$global->merchantPath() . '/plans/create_plan_for_tests'; $http->post($path, ["plan" => $params]); $gateway = new Braintree\Gateway([ 'environment' => 'development', 'merchantId' => 'integration_merchant_id', 'publicKey' => 'integration_public_key', 'privateKey' => 'integration_private_key' ]); $plans = $gateway->plan()->all(); foreach ($plans as $plan) { if ($plan->id == $newId) { $actualPlan = $plan; } } $this->assertNotNull($actualPlan); $this->assertEquals($params["billingDayOfMonth"], $actualPlan->billingDayOfMonth); $this->assertEquals($params["billingFrequency"], $actualPlan->billingFrequency); $this->assertEquals($params["currencyIsoCode"], $actualPlan->currencyIsoCode); $this->assertEquals($params["description"], $actualPlan->description); $this->assertEquals($params["name"], $actualPlan->name); $this->assertEquals($params["numberOfBillingCycles"], $actualPlan->numberOfBillingCycles); $this->assertEquals($params["price"], $actualPlan->price); } }