This issue is created for the small miscellaneous adjustments to bits of code in preparation for the first 8.x release which do not need their own separate issue. There are a few places which need minor changes and it is better to have these recorded against an issue number in the commit log, rather than have them invisible here and only findable when viewing the actual commit list.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new5.39 KB

Some of the test files contain calls to t(' ') in places where it should not be used. These are:

  1. The message shown in the test output for each assertion call
  2. Invented titles of test nodes
  3. The readable name passed to drupalCreateContentType()

After the above have been removed this leaves just one place where we have t(' ') in our test files, this is in calls to drupalPostForm() and judging by the API docs and real core test examples it is ok to use it here.

This patch removes the calls in 1-3 above.

  • jonathan1055 committed 46ab535 on 8.x-1.x
    Issue #2825195 by jonathan1055: Remove unwanted t calls in test files
    
jonathan1055’s picture

StatusFileSize
new602 bytes

In hook_node_presave the isAllowed() 3rd-party hook should be called for unpublishing, not just for publishing.

jonathan1055’s picture

StatusFileSize
new5.1 KB

Added test coverage to SchedulerApiTest.php

  • jonathan1055 committed 0b6899e on 8.x-1.x
    Issue #2825195 by jonathan1055: Call isAllowed in node_presave for...

  • jonathan1055 committed f566a70 on 8.x-1.x
    Issue #2825195 by jonathan1055: Explain nidList() in SchedulerManager....
jonathan1055’s picture

StatusFileSize
new14.79 KB

In many tests we had defined the node storage as $this->container->get('entity.manager')->getStorage('node');. However, it has also been a property created in SchedulerTestBase for a while, so this patch removes the repeated re-definitions and re-uses $this->nodeStorage instead.

  • jonathan1055 committed cddb544 on 8.x-1.x
    Issue #2825195 by jonathan1055: Reuse $this->nodeStorage in tests
    
jonathan1055’s picture

StatusFileSize
new7.92 KB

This patch implements another two @TODOs in tests:

  1. Use $this->nodetype, which is created in SchedulerTestBase, instead of re-defining with NodeType::load('page') in the test files.
  2. Use $this->nodetype->get('name') instead of the hard-coded 'Basic page'.

  • jonathan1055 committed b306283 on 8.x-1.x
    Issue #2825195 by jonathan1055: Make use of $this->nodetype and $this->...
jonathan1055’s picture

StatusFileSize
new30.83 KB

Further tidy-up of test files and re-using properties for efficiency:

  • change hard-coded 'page' to $this->type
  • change $this->nodetype->get('type') to $this->type
  • new protected $typeName for the string 'Basic Page' to avoid repeat hard-coding
  • change $this->nodetype->get('name') to $this->typeName

  • jonathan1055 committed 968e7cf on 8.x-1.x
    Issue #2825195 by jonathan1055: Use this->type and this->typename in...
jonathan1055’s picture

StatusFileSize
new2.23 KB

The schedulerManager function runCron is better named runLightweightCron as that describes what it does.

Status: Needs review » Needs work
jonathan1055’s picture

Status: Needs work » Needs review
StatusFileSize
new2.23 KB

Fixed typo in the function call.

  • jonathan1055 committed a2fec32 on 8.x-1.x
    Issue #2825195 by jonathan1055: Rename schedulerManager runCron to...
jonathan1055’s picture

StatusFileSize
new899 bytes

In 7.x Scheduler implemented hook_scheduler_api() which allowed other modules to react to Scheduler publishing or unpublishing content. In 8.x we have events, so any implementations of this hook will be ignored and should be replaced by event listeners. This patch gives a warning in the dblog if any third-party modules still try to implement hook_scheduler_api() in their 8.x code.

  • jonathan1055 committed 50e9993 on 8.x-1.x
    Issue #2825195 by jonathan1055: Give dblog warning if hook_scheduler_api...
jonathan1055’s picture

StatusFileSize
new2.33 KB

Slight text changes to the status report.

  • jonathan1055 committed 458e66f on 8.x-1.x
    Issue #2825195 by jonathan1055: Small changes to status report text
    
jonathan1055’s picture

StatusFileSize
new5.49 KB

Improved messages and text in API test module

  • jonathan1055 committed 86eaca2 on 8.x-1.x
    Issue #2825195 by jonathan1055: API test module messages
    

  • jonathan1055 committed 863f005 on 8.x-1.x
    Issue #2825195 by jonathan1055: Improved descriptions for Rules...

  • jonathan1055 committed 596b0d6 on 8.x-1.x
    Issue #2825195 by jonathan1055: In travis build, drop testing at core 8....
jonathan1055’s picture

Title: Miscellaneous changes to code » Miscellaneous changes before 8.x-1.0
Issue summary: View changes
Status: Needs review » Fixed
Related issues: +#2662476: Progress towards 8.x release of Scheduler

Scheduler 8.x-1.0 was released on 14th November 2017. All of the commits above (apart from the last one in #25 updating the Travis testing core version) were in for 8.x-1.0 hence renaming and marking this issue fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.