Make WordPress Core


Ignore:
Timestamp:
10/26/2013 12:54:27 AM (13 years ago)
Author:
nbachiyski
Message:

Extract: rename method extract_entries to extract_from_code

The other extract methods are named extract_from_<something>, this was
te only one, which wasn't.

Also, it was returning an instance of Translations,
not an array of entries, which the name suggested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/i18n/t/ExtractTest.php

    r25003 r25920  
    1414        function test_with_just_a_string() {
    1515                $expected = new Translation_Entry( array( 'singular' => 'baba', 'references' => array('baba.php:1') ) );
    16                 $result = $this->extractor->extract_entries('<?php __("baba"); ?>', 'baba.php' );
     16                $result = $this->extractor->extract_from_code('<?php __("baba"); ?>', 'baba.php' );
    1717                $this->assertEquals( $expected, $result->entries['baba'] );
    1818        }
Note: See TracChangeset for help on using the changeset viewer.