PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: MoneyTest

Source Location: /PHPUnit2-2.3.0/Samples/Money/MoneyTest.php

Class Overview

PHPUnit2_Framework_Assert
   |
   --PHPUnit2_Framework_TestCase
      |
      --MoneyTest

Tests for the Money and MoneyBag classes.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Inherited Variables

Inherited Methods

Class: PHPUnit2_Framework_TestCase

PHPUnit2_Framework_TestCase::__construct()
Constructs a test case with the given name.
PHPUnit2_Framework_TestCase::countTestCases()
Counts the number of test cases executed by run(TestResult result).
PHPUnit2_Framework_TestCase::createResult()
Creates a default TestResult object.
PHPUnit2_Framework_TestCase::getName()
Gets the name of a TestCase.
PHPUnit2_Framework_TestCase::run()
Runs the test case and collects the results in a TestResult object.
PHPUnit2_Framework_TestCase::runBare()
Runs the bare test sequence.
PHPUnit2_Framework_TestCase::runTest()
Override to run the test and assert its state.
PHPUnit2_Framework_TestCase::setName()
Sets the name of a TestCase.
PHPUnit2_Framework_TestCase::setUp()
Sets up the fixture, for example, open a network connection.
PHPUnit2_Framework_TestCase::tearDown()
Tears down the fixture, for example, close a network connection.
PHPUnit2_Framework_TestCase::toString()
Returns a string representation of the test case.

Class: PHPUnit2_Framework_Assert

PHPUnit2_Framework_Assert::__construct()
Protect constructor since it is a static only class.
PHPUnit2_Framework_Assert::assertContains()
Asserts that a haystack contains a needle.
PHPUnit2_Framework_Assert::assertEquals()
Asserts that two variables are equal.
PHPUnit2_Framework_Assert::assertFalse()
Asserts that a condition is false.
PHPUnit2_Framework_Assert::assertNotContains()
Asserts that a haystack does not contain a needle.
PHPUnit2_Framework_Assert::assertNotEquals()
Asserts that two variables are not equal.
PHPUnit2_Framework_Assert::assertNotNull()
Asserts that a variable is not NULL.
PHPUnit2_Framework_Assert::assertNotRegExp()
Asserts that a string does not match a given regular expression.
PHPUnit2_Framework_Assert::assertNotSame()
Asserts that two variables do not have the same type and value.
PHPUnit2_Framework_Assert::assertNotType()
Asserts that a variable is not of a given type.
PHPUnit2_Framework_Assert::assertNull()
Asserts that a variable is NULL.
PHPUnit2_Framework_Assert::assertRegExp()
Asserts that a string matches a given regular expression.
PHPUnit2_Framework_Assert::assertSame()
Asserts that two variables have the same type and value.
PHPUnit2_Framework_Assert::assertTrue()
Asserts that a condition is true.
PHPUnit2_Framework_Assert::assertType()
Asserts that a variable is of a given type.
PHPUnit2_Framework_Assert::fail()
Fails a test with the given message.
PHPUnit2_Framework_Assert::format()
PHPUnit2_Framework_Assert::setLooselyTyped()

Class Details

[line 40]
Tests for the Money and MoneyBag classes.


[ Top ]


Method Detail

setUp   [line 49]

void setUp( )

  • Access: protected

Overrides PHPUnit2_Framework_TestCase::setUp() (Sets up the fixture, for example, open a network connection.)
[ Top ]

testBagMultiply   [line 59]

void testBagMultiply( )

  • Access: public

[ Top ]

testBagNegate   [line 68]

void testBagNegate( )

  • Access: public

[ Top ]

testBagNotEquals   [line 103]

void testBagNotEquals( )

  • Access: public

[ Top ]

testBagSimpleAdd   [line 74]

void testBagSimpleAdd( )

  • Access: public

[ Top ]

testBagSubtract   [line 80]

void testBagSubtract( )

  • Access: public

[ Top ]

testBagSumAdd   [line 86]

void testBagSumAdd( )

  • Access: public

[ Top ]

testIsZero   [line 92]

void testIsZero( )

  • Access: public

[ Top ]

testMixedSimpleAdd   [line 97]

void testMixedSimpleAdd( )

  • Access: public

[ Top ]

testMoneyBagEquals   [line 110]

void testMoneyBagEquals( )

  • Access: public

[ Top ]

testMoneyBagHash   [line 121]

void testMoneyBagHash( )

  • Access: public

[ Top ]

testMoneyEquals   [line 126]

void testMoneyEquals( )

  • Access: public

[ Top ]

testMoneyHash   [line 135]

void testMoneyHash( )

  • Access: public

[ Top ]

testNormalize2   [line 146]

void testNormalize2( )

  • Access: public

[ Top ]

testNormalize3   [line 152]

void testNormalize3( )

  • Access: public

[ Top ]

testNormalize4   [line 159]

void testNormalize4( )

  • Access: public

[ Top ]

testPrint   [line 166]

void testPrint( )

  • Access: public

[ Top ]

testSimpleAdd   [line 170]

void testSimpleAdd( )

  • Access: public

[ Top ]

testSimpleBagAdd   [line 176]

void testSimpleBagAdd( )

  • Access: public

[ Top ]

testSimpleMultiply   [line 182]

void testSimpleMultiply( )

  • Access: public

[ Top ]

testSimpleNegate   [line 188]

void testSimpleNegate( )

  • Access: public

[ Top ]

testSimpleSubtract   [line 194]

void testSimpleSubtract( )

  • Access: public

[ Top ]

testSimplify   [line 141]

void testSimplify( )

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:12:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.