Development

Changeset 10733

You must first sign up to be able to contribute.

Changeset 10733

Show
Ignore:
Timestamp:
08/07/08 09:00:49 (4 months ago)
Author:
fabien
Message:

[doc] [1.0, 1.1, 1.2] fixed typos (closes #4145)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.0/book/15-Unit-and-Functional-Testing.txt

    r10189 r10733  
    187187    $t->isa_ok('foobar', 'string', '\'foobar\' is a string'); 
    188188    $t->isa_ok(new myObject(), 'myObject', 'new creates object of the right class'); 
    189     $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have amyMethod method'); 
     189    $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have a myMethod method'); 
    190190    $array1 = array(1, 2, array(1 => 'foo', 'a' => '4')); 
    191191    $t->is_deeply($array1, array(1, 2, array(1 => 'foo', 'a' => '4')), 
     
    663663    $b->test()->is($dom->getElementsByTagName('input')->item(1)->getAttribute('type'),'text'); 
    664664 
    665 But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an ever more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
     665But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an even more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
    666666 
    667667Listing 15-20 - The Test Browser Gives Access to the Response Content As an `sfDomCssSelector` Object 
     
    813813    ok 2 - strtolower() transforms the input to lowercase 
    814814 
    815 Functional tests should be grouped by page and start by a request. Listing 15-30 illustrates this practice. 
     815Functional tests should be grouped by page and start with a request. Listing 15-30 illustrates this practice. 
    816816 
    817817Listing 15-30 - Example Functional Test Naming Practice 
  • doc/branches/1.1/book/15-Unit-and-Functional-Testing.txt

    r10586 r10733  
    187187    $t->isa_ok('foobar', 'string', '\'foobar\' is a string'); 
    188188    $t->isa_ok(new myObject(), 'myObject', 'new creates object of the right class'); 
    189     $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have amyMethod method'); 
     189    $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have a myMethod method'); 
    190190    $array1 = array(1, 2, array(1 => 'foo', 'a' => '4')); 
    191191    $t->is_deeply($array1, array(1, 2, array(1 => 'foo', 'a' => '4')), 
     
    655655    $b->test()->is($dom->getElementsByTagName('input')->item(1)->getAttribute('type'),'text'); 
    656656 
    657 But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an ever more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
     657But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an even more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
    658658 
    659659Listing 15-20 - The Test Browser Gives Access to the Response Content As an `sfDomCssSelector` Object 
     
    732732        isRequestParameter('action', 'update')-> 
    733733 
    734         throwsException()->                   // Checks that the last request thrown an exception 
     734        throwsException()->                   // Checks that the last request threw an exception 
    735735        throwsException('RuntimeException')-> // Checks the class of the exception 
    736736        throwsException(null, '/error/');     // Checks that the content of the exception message matches the regular expression 
     
    819819    ok 2 - strtolower() transforms the input to lowercase 
    820820 
    821 Functional tests should be grouped by page and start by a request. Listing 15-31 illustrates this practice. 
     821Functional tests should be grouped by page and start with a request. Listing 15-31 illustrates this practice. 
    822822 
    823823Listing 15-31 - Example Functional Test Naming Practice 
  • doc/branches/1.2/book/15-Unit-and-Functional-Testing.txt

    r10586 r10733  
    187187    $t->isa_ok('foobar', 'string', '\'foobar\' is a string'); 
    188188    $t->isa_ok(new myObject(), 'myObject', 'new creates object of the right class'); 
    189     $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have amyMethod method'); 
     189    $t->can_ok(new myObject(), 'myMethod', 'objects of class myObject do have a myMethod method'); 
    190190    $array1 = array(1, 2, array(1 => 'foo', 'a' => '4')); 
    191191    $t->is_deeply($array1, array(1, 2, array(1 => 'foo', 'a' => '4')), 
     
    655655    $b->test()->is($dom->getElementsByTagName('input')->item(1)->getAttribute('type'),'text'); 
    656656 
    657 But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an ever more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
     657But parsing an HTML document with the PHP DOM methods is still not fast and easy enough. If you are familiar with the CSS selectors, you know that they are an even more powerful way to retrieve elements from an HTML document. Symfony provides a tool class called `sfDomCssSelector` that expects a DOM document as construction parameter. It has a getTexts() method that returns an array of strings according to a CSS selector, and a getElements() method that returns an array of DOM elements. See an example in Listing 15-20. 
    658658 
    659659Listing 15-20 - The Test Browser Gives Access to the Response Content As an `sfDomCssSelector` Object 
     
    732732        isRequestParameter('action', 'update')-> 
    733733 
    734         throwsException()->                   // Checks that the last request thrown an exception 
     734        throwsException()->                   // Checks that the last request threw an exception 
    735735        throwsException('RuntimeException')-> // Checks the class of the exception 
    736736        throwsException(null, '/error/');     // Checks that the content of the exception message matches the regular expression 
     
    819819    ok 2 - strtolower() transforms the input to lowercase 
    820820 
    821 Functional tests should be grouped by page and start by a request. Listing 15-31 illustrates this practice. 
     821Functional tests should be grouped by page and start with a request. Listing 15-31 illustrates this practice. 
    822822 
    823823Listing 15-31 - Example Functional Test Naming Practice